mirror of
https://github.com/tooot-app/app
synced 2025-02-18 04:40:57 +01:00
Fixed #52
This commit is contained in:
parent
1b23e3f0f3
commit
a366687ec6
@ -5,7 +5,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 => {})
|
if (type === 'Error') {
|
||||||
|
Haptics.impactAsync(Haptics.ImpactFeedbackStyle['Light']).catch(() => {})
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -14,13 +16,13 @@ const haptics = (
|
|||||||
case 'Warning':
|
case 'Warning':
|
||||||
case 'Error':
|
case 'Error':
|
||||||
Haptics.notificationAsync(Haptics.NotificationFeedbackType[type]).catch(
|
Haptics.notificationAsync(Haptics.NotificationFeedbackType[type]).catch(
|
||||||
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(() => {})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user