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