Skip to content

Commit 3da70f6

Browse files
committed
Remove handlerData
1 parent cff6bce commit 3da70f6

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

packages/react-native-gesture-handler/src/v3/components/GestureButtons.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const BaseButton = (props: BaseButtonProps) => {
3434
};
3535

3636
const onBegin = (e: CallbackEventType) => {
37-
if (Platform.OS === 'android' && e.handlerData.pointerInside) {
37+
if (Platform.OS === 'android' && e.pointerInside) {
3838
longPressDetected.current = false;
3939
if (onLongPress) {
4040
longPressTimeout.current = setTimeout(wrappedLongPress, delayLongPress);
@@ -45,17 +45,14 @@ export const BaseButton = (props: BaseButtonProps) => {
4545
const onStart = (e: CallbackEventType) => {
4646
onActiveStateChange?.(true);
4747

48-
if (Platform.OS !== 'android' && e.handlerData.pointerInside) {
48+
if (Platform.OS !== 'android' && e.pointerInside) {
4949
longPressDetected.current = false;
5050
if (onLongPress) {
5151
longPressTimeout.current = setTimeout(wrappedLongPress, delayLongPress);
5252
}
5353
}
5454

55-
if (
56-
!e.handlerData.pointerInside &&
57-
longPressTimeout.current !== undefined
58-
) {
55+
if (!e.pointerInside && longPressTimeout.current !== undefined) {
5956
clearTimeout(longPressTimeout.current);
6057
longPressTimeout.current = undefined;
6158
}
@@ -65,7 +62,7 @@ export const BaseButton = (props: BaseButtonProps) => {
6562
onActiveStateChange?.(false);
6663

6764
if (success && !longPressDetected.current) {
68-
onPress?.(e.handlerData.pointerInside);
65+
onPress?.(e.pointerInside);
6966
}
7067
};
7168

0 commit comments

Comments
 (0)