Page MenuHomePhorge

D6331.1765167311.diff
No OneTemporary

Size
3 KB
Referenced Files
None
Subscribers
None

D6331.1765167311.diff

diff --git a/native/chat/chat.react.js b/native/chat/chat.react.js
--- a/native/chat/chat.react.js
+++ b/native/chat/chat.react.js
@@ -20,7 +20,7 @@
import { StackView, type StackHeaderProps } from '@react-navigation/stack';
import invariant from 'invariant';
import * as React from 'react';
-import { Platform, View } from 'react-native';
+import { Platform, View, useWindowDimensions } from 'react-native';
import { useSelector } from 'react-redux';
import ThreadDraftUpdater from 'lib/components/thread-draft-updater.react';
@@ -284,6 +284,7 @@
[props.navigation],
);
+ const { width: screenWidth } = useWindowDimensions();
const screenOptions = React.useMemo(
() => ({
...defaultStackScreenOptions,
@@ -293,8 +294,10 @@
backgroundColor: colors.tabBarBackground,
borderBottomWidth: 1,
},
+ gestureEnabled: true,
+ gestureResponseDistance: screenWidth,
}),
- [colors.tabBarBackground, headerLeftButton],
+ [colors.tabBarBackground, headerLeftButton, screenWidth],
);
const chatThreadListOptions = React.useCallback(
diff --git a/native/chat/swipeable-message.react.js b/native/chat/swipeable-message.react.js
--- a/native/chat/swipeable-message.react.js
+++ b/native/chat/swipeable-message.react.js
@@ -1,7 +1,6 @@
// @flow
import type { IconProps } from '@expo/vector-icons';
-import { GestureHandlerRefContext } from '@react-navigation/stack';
import * as Haptics from 'expo-haptics';
import * as React from 'react';
import { View } from 'react-native';
@@ -243,8 +242,6 @@
);
const { messageBoxStyle, children } = props;
- const reactNavGestureHandlerRef = React.useContext(GestureHandlerRefContext);
- const waitFor = reactNavGestureHandlerRef ?? undefined;
if (!triggerReply && !triggerSidebar) {
return (
@@ -316,7 +313,6 @@
onGestureEvent={swipeEvent}
failOffsetX={isViewer ? 5 : -5}
failOffsetY={[-5, 5]}
- waitFor={waitFor}
key="gesture"
>
<Animated.View style={[messageBoxStyle, transformMessageBoxStyle]}>
diff --git a/native/navigation/community-drawer-navigator.react.js b/native/navigation/community-drawer-navigator.react.js
--- a/native/navigation/community-drawer-navigator.react.js
+++ b/native/navigation/community-drawer-navigator.react.js
@@ -6,7 +6,7 @@
type DrawerNavigationProp,
} from '@react-navigation/drawer';
import * as React from 'react';
-import { View } from 'react-native';
+import { View, useWindowDimensions } from 'react-native';
import { useStyles } from '../themes/colors';
import type { AppNavigationProp } from './app-navigator.react';
@@ -48,13 +48,15 @@
[navContext],
);
+ const { width: screenWidth } = useWindowDimensions();
const screenOptions = React.useMemo(
() => ({
drawerStyle: styles.drawerStyle,
headerShown: false,
swipeEnabled,
+ swipeEdgeWidth: screenWidth,
}),
- [styles.drawerStyle, swipeEnabled],
+ [styles.drawerStyle, swipeEnabled, screenWidth],
);
return (
diff --git a/native/profile/profile.react.js b/native/profile/profile.react.js
--- a/native/profile/profile.react.js
+++ b/native/profile/profile.react.js
@@ -7,7 +7,7 @@
type StackHeaderProps,
} from '@react-navigation/stack';
import * as React from 'react';
-import { View } from 'react-native';
+import { View, useWindowDimensions } from 'react-native';
import KeyboardAvoidingView from '../components/keyboard-avoiding-view.react';
import CommunityDrawerButton from '../navigation/community-drawer-button.react';
@@ -78,6 +78,7 @@
[props.navigation],
);
+ const { width: screenWidth } = useWindowDimensions();
const screenOptions = React.useMemo(
() => ({
header,
@@ -86,8 +87,10 @@
backgroundColor: colors.tabBarBackground,
shadowOpacity: 0,
},
+ gestureEnabled: true,
+ gestureResponseDistance: screenWidth,
}),
- [colors.tabBarBackground, headerLeftButton],
+ [colors.tabBarBackground, headerLeftButton, screenWidth],
);
return (

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 8, 4:15 AM (6 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5847017
Default Alt Text
D6331.1765167311.diff (3 KB)

Event Timeline