forked from
jollywhoppers.com/witchsky.app
Bluesky app fork with some witchin' additions 馃挮
1diff --git a/node_modules/react-native-drawer-layout/lib/module/views/Drawer.native.js b/node_modules/react-native-drawer-layout/lib/module/views/Drawer.native.js
2index efa71f9..a23c624 100644
3--- a/node_modules/react-native-drawer-layout/lib/module/views/Drawer.native.js
4+++ b/node_modules/react-native-drawer-layout/lib/module/views/Drawer.native.js
5@@ -124,15 +124,21 @@ export function Drawer({
6 }
7 onTransitionEnd?.(!open);
8 });
9+ const animatingTo = useSharedValue(null)
10 const toggleDrawer = React.useCallback((open, velocity) => {
11 'worklet';
12
13+ if (animatingTo.value === (open ? 'open' : 'close')) {
14+ return;
15+ }
16+
17 const translateX = getDrawerTranslationX(open);
18 if (velocity === undefined) {
19 runOnJS(onAnimationStart)(open);
20 }
21 touchStartX.value = 0;
22 touchX.value = 0;
23+ animatingTo.value = open ? 'open' : 'close';
24 translationX.value = withSpring(translateX, {
25 velocity,
26 stiffness: 1000,
27@@ -142,7 +148,10 @@ export function Drawer({
28 restDisplacementThreshold: 0.01,
29 restSpeedThreshold: 0.01,
30 reduceMotion: ReduceMotion.Never
31- }, finished => runOnJS(onAnimationEnd)(open, finished));
32+ }, finished => {
33+ animatingTo.value = null;
34+ runOnJS(onAnimationEnd)(open, finished)
35+ });
36 if (open) {
37 runOnJS(onOpen)();
38 } else {