Update EventListWidgetAdapter.kt

This commit is contained in:
Tibor Kaputa 2018-10-24 11:55:51 +02:00 committed by GitHub
parent 83f266afae
commit a9f8b20341
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -156,7 +156,7 @@ class EventListWidgetAdapter(val context: Context) : RemoteViewsService.RemoteVi
mediumFontSize = context.config.getFontSize()
val fromTS = DateTime().seconds() - context.config.displayPastEvents * 60
val toTS = DateTime().plusYears(1).seconds()
context.dbHelper.getEventsInBackground(fromTS = fromTS, toTS = toTS, filterEventType = true) {
context.dbHelper.getEventsInBackground(fromTS, toTS, filterEventType = true) {
val listItems = ArrayList<ListItem>(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 }))