1
0
mirror of https://github.com/tooot-app/app synced 2024-12-22 15:49:42 +01:00

Stop auto refetch when pressing on nav icon

Fix #708
This commit is contained in:
xmflsct 2023-02-25 16:00:08 +01:00
parent 45c54db617
commit 35eb7ba765

View File

@ -233,7 +233,14 @@ const Timeline: React.FC<Props> = ({
}
})
useScrollToTop(flRef)
useScrollToTop(
useRef({
scrollToTop: () => {
shouldAutoFetch.value = false
flRef.current?.scrollToOffset({ animated: true, offset: 0 })
}
})
)
useGlobalStorageListener('account.active', () =>
flRef.current?.scrollToOffset({ offset: 0, animated: false })
)