From 011ca5dac248a1d5d9300bf893af7ebcbc3fbfb9 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Sun, 27 Mar 2022 21:17:52 +0200 Subject: [PATCH] Close fullscreen and restore portrait on closing player --- Model/Player/PlayerModel.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Model/Player/PlayerModel.swift b/Model/Player/PlayerModel.swift index 3be73d27..050aa187 100644 --- a/Model/Player/PlayerModel.swift +++ b/Model/Player/PlayerModel.swift @@ -129,8 +129,15 @@ final class PlayerModel: ObservableObject { } func hide() { + controls.playingFullscreen = false presentingPlayer = false playerNavigationLinkActive = false + + #if os(iOS) + if Defaults[.lockPortraitWhenBrowsing] { + Orientation.lockOrientation(.portrait, andRotateTo: .portrait) + } + #endif } func togglePlayer() {