mirror of
https://github.com/SimpleMobileTools/Simple-Clock.git
synced 2025-06-05 22:19:17 +02:00
do not reschedule repeating alarms
This commit is contained in:
@ -230,8 +230,10 @@ fun Context.getNextAlarm(): String {
|
|||||||
|
|
||||||
fun Context.rescheduleEnabledAlarms() {
|
fun Context.rescheduleEnabledAlarms() {
|
||||||
dbHelper.getEnabledAlarms().forEach {
|
dbHelper.getEnabledAlarms().forEach {
|
||||||
|
if (it.days != TODAY_BIT || it.timeInMinutes > getCurrentDayMinutes()) {
|
||||||
scheduleNextAlarm(it, false)
|
scheduleNextAlarm(it, false)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Context.isScreenOn() = (getSystemService(Context.POWER_SERVICE) as PowerManager).isScreenOn
|
fun Context.isScreenOn() = (getSystemService(Context.POWER_SERVICE) as PowerManager).isScreenOn
|
||||||
|
Reference in New Issue
Block a user