Skip to content

Commit

Permalink
Use isAllDay instead of isSingleDayAllDayEvent to decide top bar …
Browse files Browse the repository at this point in the history
…placement

This should fix FossifyOrg#82. In my opinion, it makes much more sense to show multi-day all-day events always in the top bar (like single-day all-day events), independent of this config setting.
  • Loading branch information
jonasc authored Sep 15, 2024
1 parent cf0b815 commit d10a484
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -752,8 +752,7 @@ class WeekFragment : Fragment(), WeeklyCalendar {

private fun shouldAddEventOnTopBar(isAllDay: Boolean, startDayCode: String, endDayCode: String): Boolean {
val spansMultipleDays = startDayCode != endDayCode
val isSingleDayAllDayEvent = isAllDay && !spansMultipleDays
return isSingleDayAllDayEvent || (spansMultipleDays && config.showMidnightSpanningEventsAtTop)
return isAllDay || (spansMultipleDays && config.showMidnightSpanningEventsAtTop)
}

@SuppressLint("NewApi")
Expand Down

0 comments on commit d10a484

Please sign in to comment.