mirror of
https://github.com/yattee/yattee.git
synced 2025-04-27 23:40:35 +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 {
|
if horizontalPlayerGestureEnabled, isHorizontalDrag {
|
||||||
isHorizontalDrag = false
|
isHorizontalDrag = false
|
||||||
player.seek.onSeekGestureEnd()
|
player.seek.onSeekGestureEnd()
|
||||||
|
@ -166,6 +166,10 @@ struct VideoPlayerView: View {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
|
.onChange(of: dragGestureState) { newValue in
|
||||||
|
guard !newValue else { return }
|
||||||
|
onPlayerDragGestureEnded()
|
||||||
|
}
|
||||||
.offset(y: playerOffset)
|
.offset(y: playerOffset)
|
||||||
.animation(dragGestureState ? .interactiveSpring(response: 0.05) : .easeOut(duration: 0.2), value: playerOffset)
|
.animation(dragGestureState ? .interactiveSpring(response: 0.05) : .easeOut(duration: 0.2), value: playerOffset)
|
||||||
.backport
|
.backport
|
||||||
|
Loading…
x
Reference in New Issue
Block a user