about summary refs log tree commit diff
path: root/src/view/shell/mobile/index.tsx
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2022-11-22 12:56:56 -0600
committerPaul Frazee <pfrazee@gmail.com>2022-11-22 12:56:56 -0600
commitd7b1a2e0eedda777f3f81f8ddc30586c3738eb79 (patch)
tree4f30e5a5006bb2f4d89fed346ea7fb92180f5596 /src/view/shell/mobile/index.tsx
parent8f883d00bc75d7464391ff91fca37a9e45970a00 (diff)
downloadvoidsky-d7b1a2e0eedda777f3f81f8ddc30586c3738eb79.tar.zst
Scroll to highlighted post in threads
Diffstat (limited to 'src/view/shell/mobile/index.tsx')
-rw-r--r--src/view/shell/mobile/index.tsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/view/shell/mobile/index.tsx b/src/view/shell/mobile/index.tsx
index 8ea79b92b..e7c695ca9 100644
--- a/src/view/shell/mobile/index.tsx
+++ b/src/view/shell/mobile/index.tsx
@@ -134,7 +134,12 @@ export const MobileShell: React.FC = observer(() => {
     if (store.nav.tab.current.url === '/') {
       scrollElRef.current?.scrollToOffset({offset: 0})
     } else {
-      store.nav.tab.goBackToZero()
+      if (store.nav.tab.canGoBack) {
+        // sanity check
+        store.nav.tab.goBackToZero()
+      } else {
+        store.nav.navigate('/')
+      }
     }
   }
   const onPressMenu = () => setMainMenuActive(true)