fix #992, fixing some monthly widget view related sorting issues
This commit is contained in:
parent
05e593e781
commit
93daf501cc
|
@ -15,6 +15,7 @@ import com.simplemobiletools.calendar.pro.extensions.config
|
||||||
import com.simplemobiletools.calendar.pro.extensions.launchNewEventIntent
|
import com.simplemobiletools.calendar.pro.extensions.launchNewEventIntent
|
||||||
import com.simplemobiletools.calendar.pro.interfaces.MonthlyCalendar
|
import com.simplemobiletools.calendar.pro.interfaces.MonthlyCalendar
|
||||||
import com.simplemobiletools.calendar.pro.models.DayMonthly
|
import com.simplemobiletools.calendar.pro.models.DayMonthly
|
||||||
|
import com.simplemobiletools.calendar.pro.models.Event
|
||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import org.joda.time.DateTime
|
import org.joda.time.DateTime
|
||||||
|
|
||||||
|
@ -121,6 +122,9 @@ class MyWidgetMonthlyProvider : AppWidgetProvider() {
|
||||||
addDayNumber(context, views, day, currTextColor, id)
|
addDayNumber(context, views, day, currTextColor, id)
|
||||||
setupDayOpenIntent(context, views, id, day.code)
|
setupDayOpenIntent(context, views, id, day.code)
|
||||||
|
|
||||||
|
day.dayEvents = day.dayEvents.asSequence().sortedWith(compareBy({ it.flags and FLAG_ALL_DAY == 0 }, { it.startTS }, { it.title }))
|
||||||
|
.toMutableList() as ArrayList<Event>
|
||||||
|
|
||||||
day.dayEvents.forEach {
|
day.dayEvents.forEach {
|
||||||
var backgroundColor = it.color
|
var backgroundColor = it.color
|
||||||
var eventTextColor = backgroundColor.getContrastColor()
|
var eventTextColor = backgroundColor.getContrastColor()
|
||||||
|
|
Loading…
Reference in New Issue