mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
simplify primary color getting at the EventsHelper
This commit is contained in:
@ -253,9 +253,10 @@ class EventsHelper(val context: Context) {
|
||||
eventTypeColors.put(it.id!!, it.color)
|
||||
}
|
||||
|
||||
val primaryColor = context.resources.getColor(R.color.color_primary)
|
||||
events.forEach {
|
||||
it.updateIsPastEvent()
|
||||
it.color = eventTypeColors.get(it.eventType) ?: context.resources.getColor(R.color.color_primary)
|
||||
it.color = eventTypeColors.get(it.eventType) ?: primaryColor
|
||||
}
|
||||
|
||||
callback(events)
|
||||
|
Reference in New Issue
Block a user