From 663bfebc78ee1edacc5fcd90048c423d83494397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Thu, 31 Aug 2023 16:00:52 +0200 Subject: [PATCH] Properly disable alarms when dismissed via ReminderActivity This closes #504 --- .../clock/activities/ReminderActivity.kt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/clock/activities/ReminderActivity.kt b/app/src/main/kotlin/com/simplemobiletools/clock/activities/ReminderActivity.kt index 8e09c79..cc84569 100644 --- a/app/src/main/kotlin/com/simplemobiletools/clock/activities/ReminderActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/clock/activities/ReminderActivity.kt @@ -261,8 +261,14 @@ class ReminderActivity : SimpleActivity() { } private fun finishActivity() { - if (!wasAlarmSnoozed && alarm != null && alarm!!.days > 0) { - scheduleNextAlarm(alarm!!, false) + if (!wasAlarmSnoozed && alarm != null) { + if (alarm!!.days > 0) { + scheduleNextAlarm(alarm!!, false) + } + if (alarm!!.days < 0) { + dbHelper.updateAlarmEnabledState(alarm!!.id, false) + updateWidgets() + } } destroyEffects()