File tree Expand file tree Collapse file tree 3 files changed +6
-14
lines changed
android/src/main/java/com/swmansion/gesturehandler/react Expand file tree Collapse file tree 3 files changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -548,7 +548,7 @@ class RNGestureHandlerModule(reactContext: ReactApplicationContext?) :
548
548
val event = RNGestureHandlerEvent .obtain(
549
549
handler,
550
550
handlerFactory.createEventBuilder(handler),
551
- useTopPrefixedName = BuildConfig . REACT_NATIVE_MINOR_VERSION >= 71
551
+ true
552
552
)
553
553
sendEventForNativeAnimatedEvent(event)
554
554
} else if (handler.actionType == GestureHandler .ACTION_TYPE_JS_FUNCTION_OLD_API ) {
Original file line number Diff line number Diff line change @@ -77,12 +77,8 @@ UIManagerAny.genericDirectEventTypes = {
77
77
...UIManagerAny . genericDirectEventTypes ,
78
78
...customGHEventsConfig ,
79
79
} ;
80
- // In newer versions of RN the `genericDirectEventTypes` is located in the object
81
- // returned by UIManager.getViewManagerConfig('getConstants') or in older RN UIManager.getConstants(), we need to add it there as well to make
82
- // it compatible with RN 61+
83
- const UIManagerConstants =
84
- UIManagerAny . getViewManagerConfig ?.( 'getConstants' ) ??
85
- UIManagerAny . getConstants ?.( ) ;
80
+
81
+ const UIManagerConstants = UIManagerAny . getViewManagerConfig ?.( 'getConstants' ) ;
86
82
87
83
if ( UIManagerConstants ) {
88
84
UIManagerConstants . genericDirectEventTypes = {
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ import {
18
18
baseGestureHandlerWithDetectorProps ,
19
19
} from '../../gestureHandlerCommon' ;
20
20
import { isNewWebImplementationEnabled } from '../../../EnableNewWebImplementation' ;
21
- import { getReactNativeVersion } from '../../../getReactNativeVersion' ;
22
21
import { RNRenderer } from '../../../RNRenderer' ;
23
22
import { useCallback , useRef , useState } from 'react' ;
24
23
import { Reanimated } from '../reanimatedWrapper' ;
@@ -133,14 +132,11 @@ export function validateDetectorChildren(ref: any) {
133
132
// / \
134
133
// NativeView NativeView
135
134
if ( __DEV__ && Platform . OS !== 'web' ) {
136
- const REACT_NATIVE_VERSION = getReactNativeVersion ( ) ;
137
135
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
138
136
const wrapType =
139
- REACT_NATIVE_VERSION . minor > 63 || REACT_NATIVE_VERSION . major > 0
140
- ? // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
141
- ref . _reactInternals . elementType
142
- : // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
143
- ref . _reactInternalFiber . elementType ;
137
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
138
+ ref . _reactInternals . elementType ;
139
+
144
140
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
145
141
let instance =
146
142
RNRenderer . findHostInstance_DEPRECATED (
You can’t perform that action at this time.
0 commit comments