From f507875c0fb21154704522a6ee76c0af13b487ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Thu, 31 Aug 2023 16:16:28 +0200 Subject: [PATCH] Cancel early dismissal notification when cancelling alarm --- .../kotlin/com/simplemobiletools/clock/extensions/Context.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/clock/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/clock/extensions/Context.kt index bcf5dba..1f392ea 100644 --- a/app/src/main/kotlin/com/simplemobiletools/clock/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/clock/extensions/Context.kt @@ -195,6 +195,7 @@ fun Context.getAlarmIntent(alarm: Alarm): PendingIntent { fun Context.cancelAlarmClock(alarm: Alarm) { val alarmManager = getSystemService(Context.ALARM_SERVICE) as AlarmManager alarmManager.cancel(getAlarmIntent(alarm)) + alarmManager.cancel(getEarlyAlarmDismissalIntent(alarm)) } fun Context.hideNotification(id: Int) {