Scroll to highlighted post in threads
This commit is contained in:
parent
8f883d00bc
commit
d7b1a2e0ee
2 changed files with 32 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue