Revert "fix(mobile): preserve song context menus during press handling"
This reverts commit eae52548f1.
This commit is contained in:
1 file changed
+8
-8
@@ -7,8 +7,6 @@ import {
|
||||
|
||||
const TAP_DISTANCE = 10
|
||||
|
||||
function consumeLongPress() {}
|
||||
|
||||
type SongPressableProps = Omit<PressableProps, "onPress"> & {
|
||||
onPress?: () => void
|
||||
}
|
||||
@@ -32,16 +30,18 @@ export function SongPressable({ onPress, ...props }: SongPressableProps) {
|
||||
<Pressable
|
||||
{...props}
|
||||
onAccessibilityTap={props.onAccessibilityTap ?? onPress}
|
||||
// Let UIKit present the context menu without playing on release.
|
||||
onLongPress={props.onLongPress ?? consumeLongPress}
|
||||
onPressIn={(event) => {
|
||||
onTouchStart={(event) => {
|
||||
const { pageX, pageY } = event.nativeEvent
|
||||
touch.current = { x: pageX, y: pageY, cancelled: false }
|
||||
props.onPressIn?.(event)
|
||||
props.onTouchStart?.(event)
|
||||
}}
|
||||
onPressMove={(event) => {
|
||||
onTouchMove={(event) => {
|
||||
checkMovement(event)
|
||||
props.onPressMove?.(event)
|
||||
props.onTouchMove?.(event)
|
||||
}}
|
||||
onTouchCancel={(event) => {
|
||||
if (touch.current) touch.current.cancelled = true
|
||||
props.onTouchCancel?.(event)
|
||||
}}
|
||||
onPress={(event) => {
|
||||
checkMovement(event)
|
||||
|
||||
Reference in new issue
Block a user