Fix drag gesture

This commit is contained in:
Arkadiusz Fal
2023-05-21 13:53:23 +02:00
parent a55683e6bf
commit 4c5ef920b4
2 changed files with 11 additions and 2 deletions

View File

@@ -236,7 +236,15 @@ struct VideoPlayerView: View {
}
var playerOffset: Double {
dragGestureState && !isHorizontalDrag ? dragGestureOffset.height : viewDragOffset
dragGestureState && !isHorizontalDrag ? dragGestureOffset.height : dragOffset
}
var dragOffset: Double {
if viewDragOffset.isZero || viewDragOffset == Self.hiddenOffset {
return viewDragOffset
}
return player.presentingPlayer ? 0 : Self.hiddenOffset
}
var playerHeight: Double? {