diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-10-21 19:20:36 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-21 19:20:36 +0300 |
commit | f6649e22a762fa8f4d3060da0a274f3b83ecb06f (patch) | |
tree | 0d4156f39631503e608c78749891b71eeeb0cb11 /src | |
parent | 24679d5fe3d9f32593e7f9a6e5946cfb5b3e8434 (diff) | |
download | voidsky-f6649e22a762fa8f4d3060da0a274f3b83ecb06f.tar.zst |
double haptic (#5886)
Diffstat (limited to 'src')
-rw-r--r-- | src/view/com/util/fab/FABInner.tsx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/view/com/util/fab/FABInner.tsx b/src/view/com/util/fab/FABInner.tsx index bc89ddb60..16009bf44 100644 --- a/src/view/com/util/fab/FABInner.tsx +++ b/src/view/com/util/fab/FABInner.tsx @@ -42,14 +42,14 @@ export function FABInner({testID, icon, onPress, ...props}: FABProps) { ]}> <PressableScale testID={testID} + onPressIn={() => playHaptic('Light')} onPress={e => { playHaptic('Light') - setTimeout( - () => { - onPress?.(e) - }, - isHapticsDisabled ? 0 : 75, - ) + setTimeout(() => onPress?.(e), isHapticsDisabled ? 0 : 75) + }} + onLongPress={e => { + playHaptic('Medium') + setTimeout(() => onPress?.(e), isHapticsDisabled ? 0 : 75) }} targetScale={0.9} {...props}> |