Rename variables for clarity

This commit is contained in:
Dan Abramov
2025-01-18 02:28:55 +00:00
parent 08750175ac
commit 18bc71f2b7
+5 -7
View File
@@ -485,8 +485,8 @@ function Overlay({
navigation.navigate('Profile', {name: post.author.did}) navigation.navigate('Profile', {name: post.author.did})
}) })
const gesture = useMemo(() => { const dragLeftGesture = useMemo(() => {
const dragLeftGesture = Gesture.Pan() return Gesture.Pan()
.simultaneousWithExternalGesture(scrollGesture) .simultaneousWithExternalGesture(scrollGesture)
.activeOffsetX([0, 10]) .activeOffsetX([0, 10])
.failOffsetX([-10, 0]) .failOffsetX([-10, 0])
@@ -498,8 +498,6 @@ function Overlay({
runOnJS(pushToProfile)() runOnJS(pushToProfile)()
} }
}) })
return dragLeftGesture
}, [pushToProfile, scrollGesture]) }, [pushToProfile, scrollGesture])
const rkey = new AtUri(post.uri).rkey const rkey = new AtUri(post.uri).rkey
@@ -516,7 +514,7 @@ 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={gesture}> <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>
@@ -722,7 +720,7 @@ function Scrubber({
[player], [player],
) )
const gesture = useMemo(() => { const scrubPanGesture = useMemo(() => {
return Gesture.Pan() return Gesture.Pan()
.blocksExternalGesture(scrollGesture) .blocksExternalGesture(scrollGesture)
.failOffsetY([-10, 10]) .failOffsetY([-10, 10])
@@ -815,7 +813,7 @@ function Scrubber({
</Text> </Text>
</Animated.View> </Animated.View>
<GestureDetector gesture={gesture}> <GestureDetector gesture={scrubPanGesture}>
<View <View
style={[ style={[
a.relative, a.relative,