diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-11-22 12:56:56 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-11-22 12:56:56 -0600 |
commit | d7b1a2e0eedda777f3f81f8ddc30586c3738eb79 (patch) | |
tree | 4f30e5a5006bb2f4d89fed346ea7fb92180f5596 /src/view/shell/mobile/index.tsx | |
parent | 8f883d00bc75d7464391ff91fca37a9e45970a00 (diff) | |
download | voidsky-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.tsx | 7 |
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) |