Scroll to highlighted post in threads

This commit is contained in:
Paul Frazee
2022-11-22 12:56:56 -06:00
parent 4d2c2c5f2a
commit b60406f960
2 changed files with 32 additions and 3 deletions
+6 -1
View File
@@ -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)