From 6ddf1113bf3e05efd3d0778a15a5fc5d5ee41312 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Mon, 29 May 2023 15:54:23 +0200 Subject: [PATCH] Fix fullscreen exit --- Model/Player/PlayerModel.swift | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Model/Player/PlayerModel.swift b/Model/Player/PlayerModel.swift index c0dad52b..3d12e17b 100644 --- a/Model/Player/PlayerModel.swift +++ b/Model/Player/PlayerModel.swift @@ -236,16 +236,11 @@ final class PlayerModel: ObservableObject { } DispatchQueue.main.async { [weak self] in - self?.exitFullScreen(showControls: false) + Delay.by(0.3) { + self?.exitFullScreen(showControls: false) + } } - #if os(iOS) - if Defaults[.lockPortraitWhenBrowsing] { - Orientation.lockOrientation(.portrait, andRotateTo: .portrait) - } else { - Orientation.lockOrientation(.allButUpsideDown) - } - #endif #if os(macOS) Windows.player.hide() #endif