Skip to content

Commit d8fe0ef

Browse files
committed
Rename setDispatchAnimatedEvents -> setDispatchesAnimatedEvents
1 parent d48b159 commit d8fe0ef

6 files changed

Lines changed: 12 additions & 12 deletions

File tree

packages/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerDetectorView.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class RNGestureHandlerDetectorView(context: Context) : ReactViewGroup(context) {
1414
private var handlersToAttach: List<Int>? = null
1515
private var attachedHandlers = listOf<Int>()
1616
private var moduleId: Int = -1
17-
private var dispatchAnimatedEvents: Boolean = false
17+
private var dispatchesAnimatedEvents: Boolean = false
1818

1919
fun setHandlerTags(handlerTags: ReadableArray?) {
2020
val newHandlers = handlerTags?.toArrayList()?.map { (it as Double).toInt() } ?: emptyList()
@@ -36,8 +36,8 @@ class RNGestureHandlerDetectorView(context: Context) : ReactViewGroup(context) {
3636
handlersToAttach = null
3737
}
3838

39-
fun setDispatchAnimatedEvents(dispatchAnimatedEvents: Boolean) {
40-
this.dispatchAnimatedEvents = dispatchAnimatedEvents
39+
fun setDispatchesAnimatedEvents(dispatchesAnimatedEvents: Boolean) {
40+
this.dispatchesAnimatedEvents = dispatchesAnimatedEvents
4141
}
4242

4343
private fun attachHandlers(newHandlers: List<Int>) {
@@ -59,7 +59,7 @@ class RNGestureHandlerDetectorView(context: Context) : ReactViewGroup(context) {
5959
registry.attachHandlerToView(
6060
entry.key,
6161
this.id,
62-
if (dispatchAnimatedEvents) {
62+
if (dispatchesAnimatedEvents) {
6363
GestureHandler.ACTION_TYPE_NATIVE_DETECTOR_ANIMATED_EVENT
6464
} else {
6565
GestureHandler.ACTION_TYPE_NATIVE_DETECTOR

packages/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerDetectorViewManager.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class RNGestureHandlerDetectorViewManager :
3737
view.setModuleId(value)
3838
}
3939

40-
override fun setDispatchAnimatedEvents(view: RNGestureHandlerDetectorView, value: Boolean) {
41-
view.setDispatchAnimatedEvents(value)
40+
override fun setDispatchesAnimatedEvents(view: RNGestureHandlerDetectorView, value: Boolean) {
41+
view.setDispatchesAnimatedEvents(value)
4242
}
4343
}

packages/react-native-gesture-handler/apple/RNGestureHandlerDetector.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ - (void)updateProps:(const Props::Shared &)propsBase oldProps:(const Props::Shar
128128
[handlerManager.registry
129129
attachHandlerWithTag:handlerTag
130130
toView:self
131-
withActionType:newProps.dispatchAnimatedEvents ? RNGestureHandlerActionTypeNativeDetectorAnimatedEvent
132-
: RNGestureHandlerActionTypeNativeDetector];
131+
withActionType:newProps.dispatchesAnimatedEvents ? RNGestureHandlerActionTypeNativeDetectorAnimatedEvent
132+
: RNGestureHandlerActionTypeNativeDetector];
133133
} else if (handlerChange.second == RNGestureHandlerMutationDetach) {
134134
[handlerManager.registry detachHandlerWithTag:handlerTag];
135135
}

packages/react-native-gesture-handler/src/NativeDetector.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function NativeDetector({ gesture, children }: NativeDetectorProps) {
2525
onGestureHandlerTouchEvent={
2626
gesture.config.onGestureHandlerTouchEvent as any
2727
}
28-
dispatchAnimatedEvents={gesture.dispatchAnimatedEvents}
28+
dispatchesAnimatedEvents={gesture.dispatchesAnimatedEvents}
2929
moduleId={globalThis._RNGH_MODULE_ID}
3030
handlerTags={[gesture.tag]}
3131
style={styles.detector}>

packages/react-native-gesture-handler/src/specs/RNGestureHandlerDetectorNativeComponent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export interface NativeProps extends ViewProps {
4949
onGestureHandlerTouchEvent?: DirectEventHandler<GestureHandlerTouchEvent>;
5050

5151
handlerTags: Int32[];
52-
dispatchAnimatedEvents: boolean;
52+
dispatchesAnimatedEvents: boolean;
5353
moduleId: Int32;
5454
}
5555

packages/react-native-gesture-handler/src/useGesture.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export interface NativeGesture {
1717
tag: number;
1818
name: GestureType;
1919
config: Record<string, unknown>;
20-
dispatchAnimatedEvents: boolean;
20+
dispatchesAnimatedEvents: boolean;
2121
}
2222

2323
export function useGesture(
@@ -60,7 +60,7 @@ export function useGesture(
6060
tag: tag,
6161
name: type,
6262
config: fullConfig,
63-
dispatchAnimatedEvents:
63+
dispatchesAnimatedEvents:
6464
!!onGestureHandlerAnimatedEvent &&
6565
'__isNative' in (onGestureHandlerAnimatedEvent as any),
6666
};

0 commit comments

Comments
 (0)