ScheduleGroupingUtils
object ScheduleGroupingUtils
Utility object for grouping public transport schedules.
Used by ViewModels to prepare schedule data for display in UI components. All grouping logic should be executed in ViewModel, not in Composable functions.
Functions
Link copied to clipboard
fun computeScheduleGroups(segments: List<RouteSegment>, maxGroups: Int = PublicTransportRouteComposableDefaults.SCHEDULE_MAX_VISIBLE_GROUPS): List<ScheduleGroup>
Groups transports from the first public transport segment by their schedule.
Link copied to clipboard
fun computeScheduleGroupsFromTransports(transports: List<TransportInfo>, maxGroups: Int): List<ScheduleGroup>
Groups transports by their schedule.