Fix 'swipe back to nothing' bug
parent
b08afc12fe
commit
662a4ef23b
|
@ -195,6 +195,7 @@ export const MobileShell: React.FC = observer(() => {
|
||||||
// =
|
// =
|
||||||
const goBack = () => store.nav.tab.goBack()
|
const goBack = () => store.nav.tab.goBack()
|
||||||
const swipeGesture = Gesture.Pan()
|
const swipeGesture = Gesture.Pan()
|
||||||
|
.enabled(store.nav.tab.canGoBack)
|
||||||
.onUpdate(e => {
|
.onUpdate(e => {
|
||||||
if (store.nav.tab.canGoBack) {
|
if (store.nav.tab.canGoBack) {
|
||||||
swipeGestureInterp.value = Math.max(e.translationX / winDim.width, 0)
|
swipeGestureInterp.value = Math.max(e.translationX / winDim.width, 0)
|
||||||
|
|
Loading…
Reference in New Issue