mirror of
https://github.com/tooot-app/app
synced 2025-04-19 04:37:24 +02:00
App crashes maybe caused by Sentry
https://github.com/expo/sentry-expo/issues/120
This commit is contained in:
parent
a74cdf5768
commit
f95462889f
@ -6,9 +6,9 @@ const haptics = (
|
|||||||
type: 'Success' | 'Warning' | 'Error' | 'Light' | 'Medium' | 'Heavy'
|
type: 'Success' | 'Warning' | 'Error' | 'Light' | 'Medium' | 'Heavy'
|
||||||
) => {
|
) => {
|
||||||
if (Platform.OS === 'android') {
|
if (Platform.OS === 'android') {
|
||||||
Haptics.impactAsync(Haptics.ImpactFeedbackStyle['Light']).catch(error =>
|
Haptics.impactAsync(Haptics.ImpactFeedbackStyle['Light']).catch(error => {
|
||||||
Sentry.Native.captureException(error)
|
// Sentry.Native.captureException(error)
|
||||||
)
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -17,15 +17,17 @@ const haptics = (
|
|||||||
case 'Warning':
|
case 'Warning':
|
||||||
case 'Error':
|
case 'Error':
|
||||||
Haptics.notificationAsync(Haptics.NotificationFeedbackType[type]).catch(
|
Haptics.notificationAsync(Haptics.NotificationFeedbackType[type]).catch(
|
||||||
error => Sentry.Native.captureException(error)
|
error => {
|
||||||
|
// Sentry.Native.captureException(error)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
case 'Light':
|
case 'Light':
|
||||||
case 'Medium':
|
case 'Medium':
|
||||||
case 'Heavy':
|
case 'Heavy':
|
||||||
Haptics.impactAsync(Haptics.ImpactFeedbackStyle[type]).catch(error =>
|
Haptics.impactAsync(Haptics.ImpactFeedbackStyle[type]).catch(error => {
|
||||||
Sentry.Native.captureException(error)
|
// Sentry.Native.captureException(error)
|
||||||
)
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ const toastConfig = {
|
|||||||
success: (config: Config) => <ToastBase config={config} />,
|
success: (config: Config) => <ToastBase config={config} />,
|
||||||
warning: (config: Config) => <ToastBase config={config} />,
|
warning: (config: Config) => <ToastBase config={config} />,
|
||||||
error: (config: Config) => {
|
error: (config: Config) => {
|
||||||
Sentry.Native.captureException([config.text1, config.text2])
|
// Sentry.Native.captureException([config.text1, config.text2])
|
||||||
return <ToastBase config={config} />
|
return <ToastBase config={config} />
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user