From c76d1db104d9219f04c816dd09ed27d2d6cf5547 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 15 Nov 2018 13:38:08 +0100 Subject: [PATCH] show next event reminder toast at insert/update when appropriate --- .../calendar/pro/helpers/EventsHelper.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/EventsHelper.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/EventsHelper.kt index f5e5959cc..2a6d5df8c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/EventsHelper.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/EventsHelper.kt @@ -93,7 +93,7 @@ class EventsHelper(val context: Context) { } context.updateWidgets() - //context.scheduleNextEventReminder(event, this, activity) + context.scheduleNextEventReminder(event, activity) if (addToCalDAV && event.source != SOURCE_SIMPLE_CALENDAR && config.caldavSync) { context.calDAVHelper.insertCalDAVEvent(event) @@ -116,7 +116,7 @@ class EventsHelper(val context: Context) { eventRepetitionsDB.insertOrUpdate(event.getEventRepetition()) } - //context.scheduleNextEventReminder(event, this) + context.scheduleNextEventReminder(event) if (addToCalDAV && event.source != SOURCE_SIMPLE_CALENDAR && event.source != SOURCE_IMPORTED_ICS && config.caldavSync) { context.calDAVHelper.insertCalDAVEvent(event) } @@ -126,7 +126,7 @@ class EventsHelper(val context: Context) { } } - fun updateEvent(activity: Activity? = null, event: Event, updateAtCalDAV: Boolean, callback: (() -> Unit)? = null) { + fun updateEvent(activity: SimpleActivity? = null, event: Event, updateAtCalDAV: Boolean, callback: (() -> Unit)? = null) { event.updateIsEventRepeatable() eventsDB.insertOrUpdate(event) @@ -137,7 +137,7 @@ class EventsHelper(val context: Context) { } context.updateWidgets() - //context.scheduleNextEventReminder(event, this, activity) + context.scheduleNextEventReminder(event, activity) if (updateAtCalDAV && event.source != SOURCE_SIMPLE_CALENDAR && config.caldavSync) { context.calDAVHelper.updateCalDAVEvent(event) } @@ -220,7 +220,7 @@ class EventsHelper(val context: Context) { val parentEvent = eventsDB.getEventWithId(parentEventId) if (parentEvent != null) { - //context.scheduleNextEventReminder(parentEvent, this) + context.scheduleNextEventReminder(parentEvent) } } }