mirror of
https://github.com/yattee/yattee.git
synced 2025-04-27 07:20:32 +05:30
Fix gesture state
This commit is contained in:
parent
ba07c410f5
commit
e9df94256c
@ -74,7 +74,7 @@ extension VideoPlayerView {
|
||||
}
|
||||
}
|
||||
|
||||
private func onPlayerDragGestureEnded() {
|
||||
func onPlayerDragGestureEnded() {
|
||||
if horizontalPlayerGestureEnabled, isHorizontalDrag {
|
||||
isHorizontalDrag = false
|
||||
player.seek.onSeekGestureEnd()
|
||||
|
@ -166,6 +166,10 @@ struct VideoPlayerView: View {
|
||||
#endif
|
||||
}
|
||||
#if os(iOS)
|
||||
.onChange(of: dragGestureState) { newValue in
|
||||
guard !newValue else { return }
|
||||
onPlayerDragGestureEnded()
|
||||
}
|
||||
.offset(y: playerOffset)
|
||||
.animation(dragGestureState ? .interactiveSpring(response: 0.05) : .easeOut(duration: 0.2), value: playerOffset)
|
||||
.backport
|
||||
|
Loading…
x
Reference in New Issue
Block a user