Nebil
01/05/2023, 5:34 PMLandry Norris
01/05/2023, 5:48 PMeventsWithType.groupBy { it.day }.mapValues { it.value.sortedBy { event -> event.startTime } }
will group by day and sort each day’s events by startTime. To group by event type as well, wrap this with
events.groupBy { it.eventType }.mapValues { groupUsingAboveCode(it.value) }
Nebil
01/05/2023, 5:50 PMLandry Norris
01/05/2023, 5:52 PMcollectAsState
in your compose code.Nebil
01/05/2023, 5:59 PM