From 47371ed8f7ecdba292d4ac496cf4d89c272d4fbe Mon Sep 17 00:00:00 2001 From: Joshix-1 <57299889+Joshix-1@users.noreply.github.com> Date: Tue, 29 Oct 2024 10:29:41 +0100 Subject: [PATCH] use getBitForCalendarDay --- app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt b/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt index 623dae5b..f6339f6a 100644 --- a/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt +++ b/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt @@ -241,7 +241,7 @@ fun getTimeOfNextAlarm(alarmTimeInMinutes: Int, days: Int): Calendar { } else { val now = Calendar.getInstance() for (i in 0..8) { - val currentDay = (nextAlarmTime.get(Calendar.DAY_OF_WEEK) + 5) % 7 + val currentDay = getBitForCalendarDay(Calendar.DAY_OF_WEEK) if (isAlarmEnabledForDay(currentDay, days) && now < nextAlarmTime) { break } else {