Fix cluegy way chapter sleep timer was being reset after skipping past

This commit is contained in:
ronaldheft
2022-09-03 16:44:01 -04:00
parent fb8e6408bb
commit b697deac1c
2 changed files with 10 additions and 17 deletions
+5
View File
@@ -178,6 +178,11 @@ class AudioPlayer: NSObject {
if self.isSleepTimerSet() {
// Update the UI
NotificationCenter.default.post(name: NSNotification.Name(PlayerEvents.sleepSet.rawValue), object: nil)
// Handle a sitation where the user skips past the chapter end
if self.isChapterSleepTimerBeforeTime(currentTime) {
self.removeSleepTimer()
}
}
}
}