mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-01-14 09:39:38 +01:00
simplify primary color getting at the EventsHelper
This commit is contained in:
parent
d4179f1a66
commit
c402a68100
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user