diff options
author | dan <dan.abramov@gmail.com> | 2025-01-10 18:06:07 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-10 18:06:07 +0000 |
commit | 6ca97406c1e1f2df6d39694dd1616d9abe081baa (patch) | |
tree | 6ecb3f6ae59b9d32fec1e120a02bb6caa656cbe5 /src/components/interstitials | |
parent | a7da6462865558c7d3766628f4cd8eabd93b68f9 (diff) | |
download | voidsky-6ca97406c1e1f2df6d39694dd1616d9abe081baa.tar.zst |
A simpler fix for trending swipe issue (#7424)
Diffstat (limited to 'src/components/interstitials')
-rw-r--r-- | src/components/interstitials/Trending.tsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/components/interstitials/Trending.tsx b/src/components/interstitials/Trending.tsx index 3e0308e43..82ca6d234 100644 --- a/src/components/interstitials/Trending.tsx +++ b/src/components/interstitials/Trending.tsx @@ -1,6 +1,7 @@ import React, {useContext} from 'react' import {ScrollView, View} from 'react-native' -import {GestureDetector} from 'react-native-gesture-handler' +import {DrawerGestureContext} from 'react-native-drawer-layout' +import {Gesture, GestureDetector} from 'react-native-gesture-handler' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -12,7 +13,6 @@ import { import {useTrendingTopics} from '#/state/queries/trending/useTrendingTopics' import {useTrendingConfig} from '#/state/trending-config' import {LoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder' -import {TrendingGestureContext} from '#/view/shell/TrendingGestureContext' import {atoms as a, useGutters, useTheme} from '#/alf' import {Button, ButtonIcon} from '#/components/Button' import {TimesLarge_Stroke2_Corner0_Rounded as X} from '#/components/icons/Times' @@ -41,8 +41,9 @@ export function Inner() { setTrendingDisabled(true) }, [setTrendingDisabled]) - // This is coordinated to take precedence over the drawer pan gesture. - const trendingScrollGesture = useContext(TrendingGestureContext) + const drawerGesture = useContext(DrawerGestureContext)! + const trendingScrollGesture = + Gesture.Native().blocksExternalGesture(drawerGesture) return error || noTopics ? null : ( <View style={[t.atoms.border_contrast_low, a.border_t]}> |