mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
Merge pull request #743 from stonerl/controllcenter-swipe
Stay fullscreen when opening notification center
This commit is contained in:
commit
2b41c73d56
@ -32,8 +32,12 @@ extension VideoPlayerView {
|
|||||||
let horizontalDrag = value.translation.width
|
let horizontalDrag = value.translation.width
|
||||||
|
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
if viewDragOffset > 0, !isVerticalDrag {
|
// Detect if the gesture starts within the top 5% of the screen and the player is in fullscreen mode
|
||||||
isVerticalDrag = true
|
if value.startLocation.y <= UIScreen.main.bounds.height * 0.05, PlayerModel.shared.playingFullScreen {
|
||||||
|
// If it's a downward swipe, do nothing (return early)
|
||||||
|
if verticalDrag > 0, abs(verticalDrag) > abs(horizontalDrag) {
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user