mirror of
https://github.com/yattee/yattee.git
synced 2025-08-06 10:44:06 +00:00
Add "Pause when entering background" option (#198)
This commit is contained in:
@@ -522,7 +522,7 @@ final class PlayerModel: ObservableObject {
|
||||
}
|
||||
#else
|
||||
func handleEnterForeground() {
|
||||
setNeedsDrawing(true)
|
||||
setNeedsDrawing(presentingPlayer)
|
||||
|
||||
guard closePiPAndOpenPlayerOnEnteringForeground, playingInPictureInPicture else {
|
||||
return
|
||||
@@ -534,7 +534,8 @@ final class PlayerModel: ObservableObject {
|
||||
|
||||
func handleEnterBackground() {
|
||||
setNeedsDrawing(false)
|
||||
if !playingInPictureInPicture, !musicMode {
|
||||
|
||||
if Defaults[.pauseOnEnteringBackground], !playingInPictureInPicture, !musicMode {
|
||||
pause()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user