fix: iOS chapter sleep timer issues

This commit is contained in:
ronaldheft
2022-09-18 14:21:41 -04:00
parent 4e94fd6ad0
commit 5d23c17d30
3 changed files with 18 additions and 18 deletions
+3 -5
View File
@@ -194,11 +194,6 @@ 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()
}
}
}
}
@@ -352,6 +347,9 @@ class AudioPlayer: NSObject {
// Update the progress
self.updateNowPlaying()
// Handle a chapter sleep timer that may now be invalid
self.handleTrackChangeForChapterSleepTimer()
}
public func pause() {