Merge pull request #887 from atoghyani/ios-sleep-timer-reset-after-resume

Adding a check so chapter sleep timer is set after resume only when a…
This commit is contained in:
advplyr 2023-11-12 08:35:44 -06:00 committed by GitHub
commit 5060554640
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -116,8 +116,9 @@ extension AudioPlayer {
// MARK: - Internal helpers
internal func handleTrackChangeForChapterSleepTimer() {
// If no sleep timer is set, this does nothing
self.setChapterSleepTimer(stopAt: self.sleepTimeChapterStopAt)
if self.isChapterSleepTimerSet() {
self.setChapterSleepTimer(stopAt: self.sleepTimeChapterStopAt)
}
}
private func decrementSleepTimerIfRunning() {