mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
Fix toggling screen saver on macOS
This commit is contained in:
parent
8df452752a
commit
320207e439
@ -418,15 +418,15 @@ 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")
|
} else {
|
||||||
} else {
|
ScreenSaverManager.shared.enable()
|
||||||
ScreenSaverManager.shared.enable()
|
}
|
||||||
}
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
|
self.timeObserverThrottle.execute {
|
||||||
self.updateCurrentItemIntervals()
|
self.updateCurrentItemIntervals()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user