mirror of
https://github.com/tooot-app/app
synced 2025-01-06 23:01:51 +01:00
Update error tracing
This commit is contained in:
parent
051dc7be8c
commit
4dcc561cbf
17
src/App.tsx
17
src/App.tsx
@ -54,6 +54,7 @@ import { enableFreeze } from 'react-native-screens'
|
||||
import { QueryClientProvider } from 'react-query'
|
||||
import { Provider } from 'react-redux'
|
||||
import { PersistGate } from 'redux-persist/integration/react'
|
||||
import * as Sentry from 'sentry-expo'
|
||||
|
||||
Platform.select({
|
||||
android: LogBox.ignoreLogs(['Setting a timer for a long period of time'])
|
||||
@ -128,13 +129,15 @@ const App: React.FC = () => {
|
||||
}
|
||||
|
||||
return (
|
||||
<ActionSheetProvider>
|
||||
<AccessibilityManager>
|
||||
<ThemeManager>
|
||||
<Screens localCorrupt={localCorrupt} />
|
||||
</ThemeManager>
|
||||
</AccessibilityManager>
|
||||
</ActionSheetProvider>
|
||||
<Sentry.Native.TouchEventBoundary>
|
||||
<ActionSheetProvider>
|
||||
<AccessibilityManager>
|
||||
<ThemeManager>
|
||||
<Screens localCorrupt={localCorrupt} />
|
||||
</ThemeManager>
|
||||
</AccessibilityManager>
|
||||
</ActionSheetProvider>
|
||||
</Sentry.Native.TouchEventBoundary>
|
||||
)
|
||||
} else {
|
||||
return null
|
||||
|
@ -22,7 +22,7 @@ const TimelineActioned = React.memo(
|
||||
const { colors } = useTheme()
|
||||
const navigation =
|
||||
useNavigation<StackNavigationProp<TabLocalStackParamList>>()
|
||||
const name = account.display_name || account.username
|
||||
const name = account?.display_name || account.username
|
||||
const iconColor = colors.primaryDefault
|
||||
|
||||
const content = (content: string) => (
|
||||
|
@ -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, [
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -7,7 +7,8 @@ const sentry = () => {
|
||||
Sentry.init({
|
||||
dsn: 'https://53348b60ff844d52886e90251b3a5f41@o917354.ingest.sentry.io/6410576',
|
||||
enableInExpoDevelopment: false,
|
||||
debug: !isRelease
|
||||
debug: !isRelease,
|
||||
autoSessionTracking: true
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user