mirror of
https://github.com/yattee/yattee.git
synced 2025-07-07 04:00:05 +00:00
Improve rotation
This commit is contained in:
parent
f311ea7121
commit
886b3743b3
@ -889,13 +889,24 @@ final class PlayerModel: ObservableObject {
|
|||||||
Windows.player.toggleFullScreen()
|
Windows.player.toggleFullScreen()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
playingFullScreen = !isFullScreen
|
|
||||||
|
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
if !playingFullScreen {
|
if !playingFullScreen {
|
||||||
|
playingFullScreen = true
|
||||||
|
Orientation.lockOrientation(.allButUpsideDown, andRotateTo: OrientationTracker.shared.currentInterfaceOrientation)
|
||||||
|
} else {
|
||||||
let rotationOrientation = rotateToPortraitOnExitFullScreen ? UIInterfaceOrientation.portrait : nil
|
let rotationOrientation = rotateToPortraitOnExitFullScreen ? UIInterfaceOrientation.portrait : nil
|
||||||
Orientation.lockOrientation(.allButUpsideDown, andRotateTo: rotationOrientation)
|
Orientation.lockOrientation(.allButUpsideDown, andRotateTo: rotationOrientation)
|
||||||
|
// TODO: rework to move view before rotating
|
||||||
|
if SafeArea.insets.left > 0 {
|
||||||
|
Delay.by(0.15) {
|
||||||
|
self.playingFullScreen = false
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
self.playingFullScreen = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
playingFullScreen = !isFullScreen
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user