added check before setting state

This commit is contained in:
hstephens 2023-04-29 17:20:04 -06:00
parent 695ab84940
commit a3794a6a6a

View file

@ -366,7 +366,8 @@ class SleepTimerManager constructor(private val playerNotificationService: Playe
setSleepTimer(deviceSettings.sleepTimerLength, false) setSleepTimer(deviceSettings.sleepTimerLength, false)
} }
} else { } else {
isFirstAutoSleepTimer = true if !isFirstAutoSleepTimer:
isFirstAutoSleepTimer = true
Log.d(tag, "Current hour $currentHour is NOT between ${deviceSettings.autoSleepTimerStartTime} and ${deviceSettings.autoSleepTimerEndTime}") Log.d(tag, "Current hour $currentHour is NOT between ${deviceSettings.autoSleepTimerStartTime} and ${deviceSettings.autoSleepTimerEndTime}")
} }
} }