mirror of
https://github.com/SimpleMobileTools/Simple-Clock.git
synced 2025-06-05 22:19:17 +02:00
Make alarms created by Intent single shot if created without UI
This commit is contained in:
@ -27,7 +27,12 @@ class DismissAlarmReceiver : BroadcastReceiver() {
|
||||
context.cancelAlarmClock(alarm)
|
||||
scheduleNextAlarm(alarm, context)
|
||||
if (alarm.days < 0) {
|
||||
context.dbHelper.updateAlarmEnabledState(alarm.id, false)
|
||||
if (alarm.oneShot) {
|
||||
alarm.isEnabled = false
|
||||
context.dbHelper.deleteAlarms(arrayListOf(alarm))
|
||||
} else {
|
||||
context.dbHelper.updateAlarmEnabledState(alarm.id, false)
|
||||
}
|
||||
context.updateWidgets()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user