Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
fun mapDaysWithEvents(events: ArrayList<CalendarEvent>): ArrayList<DayIndicatorItem> {
dayIndicators.forEach { day ->
val filteredEvents = arrayListOf<CalendarEvent>()
events.forEach { event ->
if (eventOccursOnSelectedDay(event, day.date)) {
filteredEvents.add(event)
}
}
day.events = filteredEvents
}
return dayIndicators
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment