Use custom event colors in the top bar

This commit is contained in:
Naveen 2023-04-30 15:13:17 +05:30
parent dc44935795
commit 75233a1bcd
1 changed files with 5 additions and 1 deletions

View File

@ -713,7 +713,11 @@ class WeekFragment : Fragment(), WeeklyCalendar {
@SuppressLint("NewApi")
private fun addAllDayEvent(event: Event) {
(inflater.inflate(R.layout.week_all_day_event_marker, null, false) as ConstraintLayout).apply {
var backgroundColor = eventTypeColors.get(event.eventType, primaryColor)
var backgroundColor = if (event.color == 0) {
eventTypeColors.get(event.eventType, primaryColor)
} else {
event.color
}
var textColor = backgroundColor.getContrastColor()
val adjustAlpha = if (event.isTask()) {