From 549665e3021e613f3f12e7640dcc8be8d5c6f1a1 Mon Sep 17 00:00:00 2001 From: Agnieszka C <85929121+Aga-C@users.noreply.github.com> Date: Tue, 4 Jul 2023 20:09:16 +0200 Subject: [PATCH] Fixed displaying long events in weekly view (#2135) --- .../calendar/pro/fragments/WeekFragment.kt | 8 +++++++- 1 file changed, 7 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 3f4c344b0..5433d94ef 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 @@ -552,7 +552,13 @@ class WeekFragment : Fragment(), WeeklyCalendar { do { val dayOfWeek = dayColumns.indexOfFirst { it.tag == currentDayCode } if (dayOfWeek == -1 || dayOfWeek >= config.weeklyViewDays) { - continue@dayevents + if (startDayCode != endDayCode) { + currentDateTime = currentDateTime.plusDays(1) + currentDayCode = Formatter.getDayCodeFromDateTime(currentDateTime) + continue + } else { + continue@dayevents + } } val dayColumn = dayColumns[dayOfWeek]