From d142817ed6e58fddb9afef2f898924461870bdf3 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 5 Dec 2018 11:22:56 +0100 Subject: [PATCH] make sure all-day events are correctly shown on the weekly view --- .../simplemobiletools/calendar/pro/fragments/WeekFragment.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/WeekFragment.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/WeekFragment.kt index 086ae9573..ddf6a4ec4 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/WeekFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/WeekFragment.kt @@ -353,7 +353,9 @@ class WeekFragment : Fragment(), WeeklyCalendar { val minTS = Math.max(startDateTime.seconds(), mWeekTimestamp) val maxTS = Math.min(endDateTime.seconds(), mWeekTimestamp + WEEK_SECONDS) - if (minTS == maxTS) { + + // fix a visual glitch with all-day events or events lasting multiple days starting at midnight on monday, being shown the previous week too + if (minTS == maxTS && (minTS - mWeekTimestamp == WEEK_SECONDS.toLong())) { return }