Fix: Wrong day highlighted in week view

If `startWeekWithCurrentDay` was enabled, `highlightWeekends` lead to the wrong days beeing
highlighted, because the column index passed to `isWeekend` didn't correspond to the day of week
anymore. This change fixes this by using `curDay.dayOfWeek` instead.
This commit is contained in:
B14CK313 2021-12-12 19:07:13 +01:00
parent 3c6e853156
commit 6722b0e627
1 changed files with 1 additions and 1 deletions

View File

@ -217,7 +217,7 @@ class WeekFragment : Fragment(), WeeklyCalendar {
resources.getColor(R.color.theme_light_text_color)
} else if (todayCode == dayCode) {
primaryColor
} else if (highlightWeekends && isWeekend(i, config.isSundayFirst)) {
} else if (highlightWeekends && isWeekend(curDay.dayOfWeek, !config.isSundayFirst)) {
config.highlightWeekendsColor
} else {
config.textColor