Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,14 @@ export const Touchable = (props: TouchableProps) => {
}
}, []);

const onDeactivate = useCallback(
(e: EndCallbackEventType) => {
if (!e.canceled && !longPressDetected.current && e.pointerInside) {
onPress?.(e);
}
},
[onPress]
);

const onFinalize = useCallback(
(e: EndCallbackEventType) => {
if (pointerState.current === PointerState.INSIDE) {
onPressOut?.(e);

if (!e.canceled && !longPressDetected.current) {
onPress?.(e);
}
Comment thread
j-piasecki marked this conversation as resolved.
Outdated
Comment thread
j-piasecki marked this conversation as resolved.
Outdated
}

pointerState.current = PointerState.UNKNOWN;
Expand Down Expand Up @@ -157,7 +152,6 @@ export const Touchable = (props: TouchableProps) => {
enabled={!disabled}
onBegin={onBegin}
onActivate={onActivate}
onDeactivate={onDeactivate}
onFinalize={onFinalize}
onUpdate={onUpdate}
defaultOpacity={defaultOpacity}
Expand Down
Loading