diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/adapters/EventListWidgetAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/adapters/EventListWidgetAdapter.kt index ecc27fb4b..3da3eeceb 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/adapters/EventListWidgetAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/adapters/EventListWidgetAdapter.kt @@ -136,12 +136,11 @@ class EventListWidgetAdapter(val context: Context) : RemoteViewsService.RemoteVi val listItems = ArrayList(it.size) val replaceDescription = context.config.replaceDescription val sorted = it.sortedWith(compareBy({ it.startTS }, { it.endTS }, { it.title }, { if (replaceDescription) it.location else it.description })) - val sublist = sorted.subList(0, Math.min(sorted.size, 100)) var prevCode = "" val now = getNowSeconds() val today = Formatter.getDayTitle(context, Formatter.getDayCodeFromTS(now)) - sublist.forEach { + sorted.forEach { val code = Formatter.getDayCodeFromTS(it.startTS) if (code != prevCode) { val day = Formatter.getDayTitle(context, code) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/extensions/Context.kt index 5efd74310..47676c2bc 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/extensions/Context.kt @@ -397,12 +397,11 @@ fun Context.getEventListItems(events: List): ArrayList { val listItems = ArrayList(events.size) val replaceDescription = config.replaceDescription val sorted = events.sortedWith(compareBy({ it.startTS }, { it.endTS }, { it.title }, { if (replaceDescription) it.location else it.description })) - val sublist = sorted.subList(0, Math.min(sorted.size, 100)) var prevCode = "" val now = getNowSeconds() val today = Formatter.getDayTitle(this, Formatter.getDayCodeFromTS(now)) - sublist.forEach { + sorted.forEach { val code = Formatter.getDayCodeFromTS(it.startTS) if (code != prevCode) { val day = Formatter.getDayTitle(this, code)