Properly disable alarms when dismissed via ReminderActivity

This closes #504
This commit is contained in:
Ensar Sarajčić 2023-08-31 16:00:52 +02:00
parent f002d10179
commit 663bfebc78

View file

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