do not reschedule repeating alarms

This commit is contained in:
tibbi 2020-11-05 11:50:56 +01:00
parent edc7d4f942
commit 822044ed0f

View File

@ -230,8 +230,10 @@ fun Context.getNextAlarm(): String {
fun Context.rescheduleEnabledAlarms() {
dbHelper.getEnabledAlarms().forEach {
if (it.days != TODAY_BIT || it.timeInMinutes > getCurrentDayMinutes()) {
scheduleNextAlarm(it, false)
}
}
}
fun Context.isScreenOn() = (getSystemService(Context.POWER_SERVICE) as PowerManager).isScreenOn