Merge pull request #1393 from tanvir-ahmod/fix_1385

Fix #1385, cancel notification and pending intent if event is deleted
This commit is contained in:
Tibor Kaputa 2021-07-05 23:08:22 +02:00 committed by GitHub
commit 971b8b390a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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) {