Remove swipe gesture
This commit is contained in:
@@ -489,25 +489,6 @@ function Overlay({
|
|||||||
'ImmersiveVideo',
|
'ImmersiveVideo',
|
||||||
)
|
)
|
||||||
|
|
||||||
const pushToProfile = useNonReactiveCallback(() => {
|
|
||||||
navigation.navigate('Profile', {name: post.author.did})
|
|
||||||
})
|
|
||||||
|
|
||||||
const dragLeftGesture = useMemo(() => {
|
|
||||||
return Gesture.Pan()
|
|
||||||
.simultaneousWithExternalGesture(scrollGesture)
|
|
||||||
.activeOffsetX([0, 10])
|
|
||||||
.failOffsetX([-10, 0])
|
|
||||||
.failOffsetY([-5, 5])
|
|
||||||
.maxPointers(1)
|
|
||||||
.onEnd(evt => {
|
|
||||||
'worklet'
|
|
||||||
if (evt.translationX < -50 && evt.velocityX < -300) {
|
|
||||||
runOnJS(pushToProfile)()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}, [pushToProfile, scrollGesture])
|
|
||||||
|
|
||||||
const rkey = new AtUri(post.uri).rkey
|
const rkey = new AtUri(post.uri).rkey
|
||||||
const record = AppBskyFeedPost.isRecord(post.record) ? post.record : undefined
|
const record = AppBskyFeedPost.isRecord(post.record) ? post.record : undefined
|
||||||
const richText = new RichTextAPI({
|
const richText = new RichTextAPI({
|
||||||
@@ -522,11 +503,9 @@ function Overlay({
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<View style={[a.absolute, a.inset_0, a.z_20]}>
|
<View style={[a.absolute, a.inset_0, a.z_20]}>
|
||||||
<GestureDetector gesture={dragLeftGesture}>
|
<View style={[a.flex_1]}>
|
||||||
<View style={[a.flex_1]}>
|
<PlayPauseTapArea player={player} post={post} />
|
||||||
<PlayPauseTapArea player={player} post={post} />
|
</View>
|
||||||
</View>
|
|
||||||
</GestureDetector>
|
|
||||||
|
|
||||||
<LinearGradient
|
<LinearGradient
|
||||||
colors={['rgba(0,0,0,0)', 'rgba(0,0,0,0.8)', 'rgba(0,0,0,0.95)']}
|
colors={['rgba(0,0,0,0)', 'rgba(0,0,0,0.8)', 'rgba(0,0,0,0.95)']}
|
||||||
|
|||||||
Reference in New Issue
Block a user