DroidKaigi/conference-app-2024

The order of favorite sessions on the screen is incorrect

Closed this issue · 1 comments

The order of favorite sessions on the screen is incorrect. It seems that if we have favorite sessions spanning multiple days, the order is wrong.
image
https://x.com/CookieySun/status/1833817419242217848

The code is here 👀

.filtered(
Filters(
filterFavorite = true,
days = selectedDayFilters.toList(),
),
)
.timetableItems.groupBy {
TimeSlot(it.startsTimeString, it.endsTimeString)
}.mapValues { entry ->
entry.value.sortedWith(
compareBy({ it.day?.name.orEmpty() }, { it.startsTimeString }),
)