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 1/4] 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() 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 2/4] 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) { From 5b362b097dc96b0e4a59b8f971dfbb1a1e9acf21 Mon Sep 17 00:00:00 2001 From: Tibor Kaputa Date: Thu, 31 Aug 2023 16:47:03 +0200 Subject: [PATCH 3/4] adding an empty line --- .../com/simplemobiletools/clock/activities/ReminderActivity.kt | 1 + 1 file changed, 1 insertion(+) 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 cc84569..9d4e3f1 100644 --- a/app/src/main/kotlin/com/simplemobiletools/clock/activities/ReminderActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/clock/activities/ReminderActivity.kt @@ -265,6 +265,7 @@ class ReminderActivity : SimpleActivity() { if (alarm!!.days > 0) { scheduleNextAlarm(alarm!!, false) } + if (alarm!!.days < 0) { dbHelper.updateAlarmEnabledState(alarm!!.id, false) updateWidgets() From f2aa374f59d6795159e83863294ee8189e24aa72 Mon Sep 17 00:00:00 2001 From: "J. Lavoie" Date: Tue, 22 Aug 2023 13:54:58 +0000 Subject: [PATCH 4/4] Translated using Weblate (Italian) Currently translated at 100.0% (42 of 42 strings) Translation: Simple Mobile Tools/Simple Clock Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-clock/it/ --- app/src/main/res/values-it/strings.xml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 2faf23f..9d6718a 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -29,8 +29,7 @@ Nessun contaminuti trovato Aggiungi contaminuti Allarme imminente - Early alarm dismissal - + Arresto anticipato dell\'allarme I contaminuti sono in funzione Il contaminuti per %s รจ in funzione @@ -54,4 +53,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - + \ No newline at end of file