One more haptic tweak (#5979)
* remove 10ms delay and make light * make like haptic light * same for PostThreadComposePrompt
This commit is contained in:
@@ -5,7 +5,6 @@ import {useLingui} from '@lingui/react'
|
||||
|
||||
import {PressableScale} from '#/lib/custom-animations/PressableScale'
|
||||
import {useHaptics} from '#/lib/haptics'
|
||||
import {isIOS} from '#/platform/detection'
|
||||
import {useProfileQuery} from '#/state/queries/profile'
|
||||
import {useSession} from '#/state/session'
|
||||
import {UserAvatar} from '#/view/com/util/UserAvatar'
|
||||
@@ -45,11 +44,7 @@ export function PostThreadComposePrompt({
|
||||
onPressIn={ios(() => playHaptic('Light'))}
|
||||
onPress={() => {
|
||||
onPressCompose()
|
||||
if (isIOS) {
|
||||
setTimeout(() => playHaptic('Medium'), 10)
|
||||
} else {
|
||||
playHaptic('Light')
|
||||
}
|
||||
playHaptic('Light')
|
||||
}}
|
||||
onLongPress={ios(() => {
|
||||
onPressCompose()
|
||||
|
||||
@@ -10,7 +10,7 @@ import {useMinimalShellFabTransform} from '#/lib/hooks/useMinimalShellTransform'
|
||||
import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries'
|
||||
import {clamp} from '#/lib/numbers'
|
||||
import {gradients} from '#/lib/styles'
|
||||
import {isIOS, isWeb} from '#/platform/detection'
|
||||
import {isWeb} from '#/platform/detection'
|
||||
import {ios} from '#/alf'
|
||||
|
||||
export interface FABProps
|
||||
@@ -44,11 +44,7 @@ export function FABInner({testID, icon, onPress, ...props}: FABProps) {
|
||||
onPressIn={ios(() => playHaptic('Light'))}
|
||||
onPress={evt => {
|
||||
onPress?.(evt)
|
||||
if (isIOS) {
|
||||
setTimeout(() => playHaptic('Medium'), 10)
|
||||
} else {
|
||||
playHaptic('Light')
|
||||
}
|
||||
playHaptic('Light')
|
||||
}}
|
||||
onLongPress={ios((evt: any) => {
|
||||
onPress?.(evt)
|
||||
|
||||
@@ -119,7 +119,7 @@ let PostCtrls = ({
|
||||
try {
|
||||
setIsToggleLikeIcon(true)
|
||||
if (!post.viewer?.like) {
|
||||
playHaptic()
|
||||
playHaptic('Light')
|
||||
sendInteraction({
|
||||
item: post.uri,
|
||||
event: 'app.bsky.feed.defs#interactionLike',
|
||||
|
||||
Reference in New Issue
Block a user