Skip to content

Commit 16d9071

Browse files
authored
Remove dispatchesAnimatedEvents from the native detector (#3652)
## Description #3646 removed the Animated action type, but there are still references left to `dispatchesAnimatedEvents` in the native detector, while the property has been moved to the config of individual gestures. This PR removes those references. ## Test plan Check the native detector examples
1 parent d23c225 commit 16d9071

File tree

4 files changed

+0
-13
lines changed

4 files changed

+0
-13
lines changed

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ 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 dispatchesAnimatedEvents: Boolean = false
1817

1918
fun setHandlerTags(handlerTags: ReadableArray?) {
2019
val newHandlers = handlerTags?.toArrayList()?.map { (it as Double).toInt() } ?: emptyList()
@@ -36,10 +35,6 @@ class RNGestureHandlerDetectorView(context: Context) : ReactViewGroup(context) {
3635
handlersToAttach = null
3736
}
3837

39-
fun setDispatchesAnimatedEvents(dispatchesAnimatedEvents: Boolean) {
40-
this.dispatchesAnimatedEvents = dispatchesAnimatedEvents
41-
}
42-
4338
private fun attachHandlers(newHandlers: List<Int>) {
4439
val registry = RNGestureHandlerModule.registries[moduleId]
4540
?: throw Exception("Tried to access a non-existent registry")

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,4 @@ class RNGestureHandlerDetectorViewManager :
3636
override fun setModuleId(view: RNGestureHandlerDetectorView, value: Int) {
3737
view.setModuleId(value)
3838
}
39-
40-
override fun setDispatchesAnimatedEvents(view: RNGestureHandlerDetectorView, value: Boolean) {
41-
view.setDispatchesAnimatedEvents(value)
42-
}
4339
}

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

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

5151
handlerTags: Int32[];
52-
dispatchesAnimatedEvents: boolean;
5352
moduleId: Int32;
5453
}
5554

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ export function NativeDetector({ gesture, children }: NativeDetectorProps) {
4848
onGestureHandlerTouchEvent={
4949
gesture.gestureEvents.onGestureHandlerTouchEvent
5050
}
51-
dispatchesAnimatedEvents={
52-
gesture.config.dispatchesAnimatedEvents as boolean
53-
}
5451
moduleId={globalThis._RNGH_MODULE_ID}
5552
handlerTags={[gesture.tag]}
5653
style={styles.detector}>

0 commit comments

Comments
 (0)