diff --git a/apps/mobile/components/song-pressable.tsx b/apps/mobile/components/song-pressable.tsx index b509d29..ed05305 100644 --- a/apps/mobile/components/song-pressable.tsx +++ b/apps/mobile/components/song-pressable.tsx @@ -7,6 +7,8 @@ import { const TAP_DISTANCE = 10 +function consumeLongPress() {} + type SongPressableProps = Omit & { onPress?: () => void } @@ -30,18 +32,16 @@ export function SongPressable({ onPress, ...props }: SongPressableProps) { { + // Let UIKit present the context menu without playing on release. + onLongPress={props.onLongPress ?? consumeLongPress} + onPressIn={(event) => { const { pageX, pageY } = event.nativeEvent touch.current = { x: pageX, y: pageY, cancelled: false } - props.onTouchStart?.(event) + props.onPressIn?.(event) }} - onTouchMove={(event) => { + onPressMove={(event) => { checkMovement(event) - props.onTouchMove?.(event) - }} - onTouchCancel={(event) => { - if (touch.current) touch.current.cancelled = true - props.onTouchCancel?.(event) + props.onPressMove?.(event) }} onPress={(event) => { checkMovement(event)