From 2601cf1c29625cbac365170d05cec8637beeedd6 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Wed, 1 Feb 2023 10:31:08 -0600 Subject: [PATCH 1/3] Nav swipe: increase the distance traveled in response to gesture movement. This causes swipes to feel faster and more responsive. --- src/view/shell/mobile/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/shell/mobile/index.tsx b/src/view/shell/mobile/index.tsx index 62ab7a2ad7..83cb7652ec 100644 --- a/src/view/shell/mobile/index.tsx +++ b/src/view/shell/mobile/index.tsx @@ -353,7 +353,7 @@ export const MobileShell: React.FC = observer(() => { /> Date: Wed, 1 Feb 2023 10:41:24 -0600 Subject: [PATCH 2/3] Fix: fully clamp the swipe against the edge --- src/view/com/util/gestures/HorzSwipe.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/view/com/util/gestures/HorzSwipe.tsx b/src/view/com/util/gestures/HorzSwipe.tsx index 22b15afe77..6f44dcdc70 100644 --- a/src/view/com/util/gestures/HorzSwipe.tsx +++ b/src/view/com/util/gestures/HorzSwipe.tsx @@ -90,6 +90,7 @@ export function HorzSwipe({ // swiping right (diffX < 0 && !canSwipeRight) ) { + panX.setValue(0) return } From 04bcf5943e24b738d74371465d64fb8a0443c059 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Wed, 1 Feb 2023 11:00:05 -0600 Subject: [PATCH 3/3] Improve the performance of swipes by skipping the interaction manager --- src/view/com/util/gestures/HorzSwipe.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/view/com/util/gestures/HorzSwipe.tsx b/src/view/com/util/gestures/HorzSwipe.tsx index 6f44dcdc70..8e5f7fc48a 100644 --- a/src/view/com/util/gestures/HorzSwipe.tsx +++ b/src/view/com/util/gestures/HorzSwipe.tsx @@ -120,6 +120,7 @@ export function HorzSwipe({ toValue: final, duration: 100, useNativeDriver, + isInteraction: false, }).start(() => { onSwipeEnd?.(final) panX.flattenOffset() @@ -131,6 +132,7 @@ export function HorzSwipe({ toValue: 0, duration: 100, useNativeDriver, + isInteraction: false, }).start(() => { panX.flattenOffset() panX.setValue(0)