From 3fcc23a320da1f6b93815c0029d4438d73973fb2 Mon Sep 17 00:00:00 2001 From: tanvir-ahmod Date: Sat, 12 Jun 2021 20:26:37 +0600 Subject: [PATCH] Fix #1385, cancel notification and pending intent if event is deleted for future occurrences --- .../com/simplemobiletools/calendar/pro/helpers/EventsHelper.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 79bf677fe..e9ac25ebf 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 @@ -181,7 +181,8 @@ class EventsHelper(val context: Context) { fun addEventRepeatLimit(eventId: Long, limitTS: Long) { val time = Formatter.getDateTimeFromTS(limitTS) eventsDB.updateEventRepetitionLimit(limitTS - time.hourOfDay, eventId) - + context.cancelNotification(eventId) + context.cancelPendingIntent(eventId) if (config.caldavSync) { val event = eventsDB.getEventWithId(eventId) if (event?.getCalDAVCalendarId() != 0) {