Fix 'swipe back to nothing' bug

zio/stable
Paul Frazee 2022-12-05 10:39:34 -06:00
parent b08afc12fe
commit 662a4ef23b
1 changed files with 1 additions and 0 deletions

View File

@ -195,6 +195,7 @@ export const MobileShell: React.FC = observer(() => {
// =
const goBack = () => store.nav.tab.goBack()
const swipeGesture = Gesture.Pan()
.enabled(store.nav.tab.canGoBack)
.onUpdate(e => {
if (store.nav.tab.canGoBack) {
swipeGestureInterp.value = Math.max(e.translationX / winDim.width, 0)