From ecbf57ab38b0dd1d62410f5efdc07a0c702ae1b4 Mon Sep 17 00:00:00 2001 From: Bindu <56578479+vbh@users.noreply.github.com> Date: Mon, 21 Jun 2021 21:44:31 -0700 Subject: [PATCH] Fix: Events spanning multiple days are only shown on first one --- .../calendar/pro/fragments/MonthDayFragment.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/MonthDayFragment.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/MonthDayFragment.kt index 6f815478b..d20224a46 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/MonthDayFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/MonthDayFragment.kt @@ -127,7 +127,10 @@ class MonthDayFragment : Fragment(), MonthlyCalendar, RefreshRecyclerViewListene val startDateTime = Formatter.getDateTimeFromTS(it.startTS) shownMonthDateTime.year == startDateTime.year && shownMonthDateTime.monthOfYear == startDateTime.monthOfYear } else { - Formatter.getDayCodeFromTS(it.startTS) == mSelectedDayCode + val selectionDate = Formatter.getDateTimeFromCode(mSelectedDayCode).toLocalDate() + val startDate = Formatter.getDateFromTS(it.startTS) + val endDate = Formatter.getDateFromTS(it.endTS) + selectionDate in startDate..endDate } }