1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Fix Sentry reported crashes

This commit is contained in:
xmflsct
2022-10-27 22:51:02 +02:00
parent db6b5e4e70
commit e5f750c3c8
11 changed files with 44 additions and 80 deletions

View File

@ -12,10 +12,7 @@ const TabSharedToot: React.FC<TabSharedStackScreenProps<'Tab-Shared-Toot'>> = ({
params: { toot, rootQueryKey }
}
}) => {
const queryKey: QueryKeyTimeline = [
'Timeline',
{ page: 'Toot', toot: toot.id }
]
const queryKey: QueryKeyTimeline = ['Timeline', { page: 'Toot', toot: toot.id }]
const flRef = useRef<FlatList>(null)
@ -46,10 +43,12 @@ const TabSharedToot: React.FC<TabSharedStackScreenProps<'Tab-Shared-Toot'>> = ({
if (pointer < 1) return
try {
setTimeout(() => {
flRef.current?.scrollToIndex({
index: pointer,
viewOffset: 100
})
try {
flRef.current?.scrollToIndex({
index: pointer,
viewOffset: 100
})
} catch {}
}, 500)
} catch (error) {
return