Merge pull request #1837 from DoozyDoz/bugfix_all_day_event_sticks_at_top

Fixes #1767
This commit is contained in:
Tibor Kaputa 2022-10-25 10:57:53 +02:00 committed by GitHub
commit d485be7cf4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -453,7 +453,7 @@ class WeekFragment : Fragment(), WeeklyCalendar {
val endDateTime = Formatter.getDateTimeFromTS(event.endTS)
val endDayCode = Formatter.getDayCodeFromDateTime(endDateTime)
if (event.getIsAllDay() || ((startDayCode != endDayCode) && config.showMidnightSpanningEventsAtTop)) {
if ((event.getIsAllDay() || (startDayCode != endDayCode)) && config.showMidnightSpanningEventsAtTop) {
continue
}
@ -541,7 +541,7 @@ class WeekFragment : Fragment(), WeeklyCalendar {
val startDayCode = Formatter.getDayCodeFromDateTime(startDateTime)
val endDateTime = Formatter.getDateTimeFromTS(event.endTS)
val endDayCode = Formatter.getDayCodeFromDateTime(endDateTime)
if (event.getIsAllDay() || ((startDayCode != endDayCode) && config.showMidnightSpanningEventsAtTop)) {
if ((event.getIsAllDay() || (startDayCode != endDayCode)) && config.showMidnightSpanningEventsAtTop) {
addAllDayEvent(event)
} else {
var currentDateTime = startDateTime