Scroll to highlighted post in threads

This commit is contained in:
Paul Frazee 2022-11-22 12:56:56 -06:00
parent 8f883d00bc
commit d7b1a2e0ee
2 changed files with 32 additions and 3 deletions

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)