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

Update error tracing

This commit is contained in:
Zhiyuan Zheng
2022-05-18 00:11:31 +02:00
parent 051dc7be8c
commit 4dcc561cbf
5 changed files with 23 additions and 13 deletions

View File

@ -377,7 +377,12 @@ const ScreenCompose: React.FC<RootStackScreenProps<'Screen-Compose'>> = ({
]
)
} else {
Sentry.Native.captureMessage('Compose posting', error)
Sentry.Native.captureMessage('Compose posting', {
contexts: {
errorObject: error,
errorString: error.toString()
}
})
haptics('Error')
composeDispatch({ type: 'posting', payload: false })
Alert.alert(t('heading.right.alert.default.title'), undefined, [

View File

@ -35,7 +35,7 @@ const TabSharedToot: React.FC<TabSharedStackScreenProps<'Tab-Shared-Toot'>> = ({
result.data.pages.flatMap(d => [...d.body])
: []
// Auto go back when toot page is empty
if (flattenData.length === 0) {
if (flattenData.length < 1) {
navigation.goBack()
return
}
@ -46,13 +46,14 @@ const TabSharedToot: React.FC<TabSharedStackScreenProps<'Tab-Shared-Toot'>> = ({
if (pointer < 1) return
try {
setTimeout(() => {
console.log('scrolling')
flRef.current?.scrollToIndex({
index: pointer,
viewOffset: 100
})
}, 500)
} catch {}
} catch (error) {
return
}
}
}
})