Fix toggling screen saver on macOS

This commit is contained in:
Arkadiusz Fal 2021-11-02 12:01:45 +01:00
parent 8df452752a
commit 320207e439

View File

@ -418,7 +418,6 @@ final class PlayerModel: ObservableObject {
self.objectWillChange.send() self.objectWillChange.send()
} }
self.timeObserverThrottle.execute {
#if os(macOS) #if os(macOS)
if player.timeControlStatus == .playing { if player.timeControlStatus == .playing {
ScreenSaverManager.shared.disable(reason: "Yattee is playing video") ScreenSaverManager.shared.disable(reason: "Yattee is playing video")
@ -427,6 +426,7 @@ final class PlayerModel: ObservableObject {
} }
#endif #endif
self.timeObserverThrottle.execute {
self.updateCurrentItemIntervals() self.updateCurrentItemIntervals()
} }
} }