Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

A simpler fix for trending swipe issue (#7424)

authored by

dan and committed by
GitHub
6ca97406 a7da6462

+42 -15
+36
patches/react-native-gesture-handler+2.20.2.patch
··· 1 + diff --git a/node_modules/react-native-gesture-handler/apple/RNGestureHandler.mm b/node_modules/react-native-gesture-handler/apple/RNGestureHandler.mm 2 + index 43d11b4..5bf0d32 100644 3 + --- a/node_modules/react-native-gesture-handler/apple/RNGestureHandler.mm 4 + +++ b/node_modules/react-native-gesture-handler/apple/RNGestureHandler.mm 5 + @@ -461,16 +461,23 @@ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer 6 + - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer 7 + shouldRequireFailureOfGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer 8 + { 9 + - if ([_handlersToWaitFor count]) { 10 + - RNGestureHandler *handler = [RNGestureHandler findGestureHandlerByRecognizer:otherGestureRecognizer]; 11 + - if (handler != nil) { 12 + - for (NSNumber *handlerTag in _handlersToWaitFor) { 13 + - if ([handler.tag isEqual:handlerTag]) { 14 + - return YES; 15 + - } 16 + - } 17 + + RNGestureHandler *handler = [RNGestureHandler findGestureHandlerByRecognizer:otherGestureRecognizer]; 18 + + if (handler == nil) { 19 + + return NO; 20 + + } 21 + + 22 + + for (NSNumber *handlerTag in _handlersToWaitFor) { 23 + + if ([handler.tag isEqual:handlerTag]) { 24 + + return YES; 25 + } 26 + } 27 + + 28 + + for (NSNumber *handlerTag in handler->_handlersThatShouldWait) { 29 + + if ([_tag isEqual:handlerTag]) { 30 + + return YES; 31 + + } 32 + + } 33 + + 34 + return NO; 35 + } 36 +
+5 -4
src/components/interstitials/Trending.tsx
··· 1 1 import React, {useContext} from 'react' 2 2 import {ScrollView, View} from 'react-native' 3 - import {GestureDetector} from 'react-native-gesture-handler' 3 + import {DrawerGestureContext} from 'react-native-drawer-layout' 4 + import {Gesture, GestureDetector} from 'react-native-gesture-handler' 4 5 import {msg} from '@lingui/macro' 5 6 import {useLingui} from '@lingui/react' 6 7 ··· 12 13 import {useTrendingTopics} from '#/state/queries/trending/useTrendingTopics' 13 14 import {useTrendingConfig} from '#/state/trending-config' 14 15 import {LoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder' 15 - import {TrendingGestureContext} from '#/view/shell/TrendingGestureContext' 16 16 import {atoms as a, useGutters, useTheme} from '#/alf' 17 17 import {Button, ButtonIcon} from '#/components/Button' 18 18 import {TimesLarge_Stroke2_Corner0_Rounded as X} from '#/components/icons/Times' ··· 41 41 setTrendingDisabled(true) 42 42 }, [setTrendingDisabled]) 43 43 44 - // This is coordinated to take precedence over the drawer pan gesture. 45 - const trendingScrollGesture = useContext(TrendingGestureContext) 44 + const drawerGesture = useContext(DrawerGestureContext)! 45 + const trendingScrollGesture = 46 + Gesture.Native().blocksExternalGesture(drawerGesture) 46 47 47 48 return error || noTopics ? null : ( 48 49 <View style={[t.atoms.border_contrast_low, a.border_t]}>
-7
src/view/shell/TrendingGestureContext.tsx
··· 1 - import {createContext} from 'react' 2 - import {Gesture} from 'react-native-gesture-handler' 3 - 4 - // Not really used but serves as a fallback for types. 5 - const noopGesture = Gesture.Native() 6 - 7 - export const TrendingGestureContext = createContext(noopGesture)
+1 -4
src/view/shell/index.tsx
··· 34 34 import {updateActiveViewAsync} from '../../../modules/expo-bluesky-swiss-army/src/VisibilityView' 35 35 import {Composer} from './Composer' 36 36 import {DrawerContent} from './Drawer' 37 - import {TrendingGestureContext} from './TrendingGestureContext' 38 37 39 38 function ShellInner() { 40 39 const t = useTheme() ··· 145 144 dim: 'rgba(10, 13, 16, 0.8)', 146 145 }), 147 146 }}> 148 - <TrendingGestureContext.Provider value={trendingScrollGesture}> 149 - <TabsNavigator /> 150 - </TrendingGestureContext.Provider> 147 + <TabsNavigator /> 151 148 </Drawer> 152 149 </ErrorBoundary> 153 150 </View>