From 098b945b5501dd6578745364b6a9d0ac9f6df13f Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 2 Nov 2020 20:10:25 +0100 Subject: [PATCH] lets fetch more events at the weekly view, rather than less --- .../calendar/pro/helpers/WeeklyCalendarImpl.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/WeeklyCalendarImpl.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/WeeklyCalendarImpl.kt index 467354a77..8e9d0b8f1 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/WeeklyCalendarImpl.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/WeeklyCalendarImpl.kt @@ -4,6 +4,7 @@ import android.content.Context import com.simplemobiletools.calendar.pro.extensions.eventsHelper import com.simplemobiletools.calendar.pro.interfaces.WeeklyCalendar import com.simplemobiletools.calendar.pro.models.Event +import com.simplemobiletools.commons.helpers.DAY_SECONDS import com.simplemobiletools.commons.helpers.WEEK_SECONDS import java.util.* @@ -12,7 +13,7 @@ class WeeklyCalendarImpl(val callback: WeeklyCalendar, val context: Context) { fun updateWeeklyCalendar(weekStartTS: Long) { val endTS = weekStartTS + 2 * WEEK_SECONDS - context.eventsHelper.getEvents(weekStartTS, endTS) { + context.eventsHelper.getEvents(weekStartTS - DAY_SECONDS, endTS) { mEvents = it callback.updateWeeklyCalendar(it) }