Skip to content

Commit 85c364a

Browse files
committed
Add ifdefs for new arch
1 parent a3884ac commit 85c364a

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

packages/react-native-gesture-handler/apple/RNGestureHandlerManager.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
#ifdef RCT_NEW_ARCH_ENABLED
1313
- (nonnull instancetype)initWithModuleRegistry:(nonnull RCTModuleRegistry *)moduleRegistry
1414
viewRegistry:(nonnull RCTViewRegistry *)viewRegistry;
15+
16+
- (void)reattachHandlersIfNeeded;
1517
#else
1618
- (nonnull instancetype)initWithUIManager:(nonnull RCTUIManager *)uiManager
1719
eventDispatcher:(nonnull id<RCTEventDispatcherProtocol>)eventDispatcher;
@@ -37,6 +39,4 @@
3739

3840
- (nullable RNGestureHandler *)handlerWithTag:(nonnull NSNumber *)handlerTag;
3941

40-
- (void)reattachHandlersIfNeeded;
41-
4242
@end

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ - (id)handlerWithTag:(NSNumber *)handlerTag
256256
return [_registry handlerWithTag:handlerTag];
257257
}
258258

259+
#ifdef RCT_NEW_ARCH_ENABLED
259260
- (void)reattachHandlersIfNeeded
260261
{
261262
// Re-bind handlers to their current native views. On Fabric, when a parent view has
@@ -270,6 +271,7 @@ - (void)reattachHandlersIfNeeded
270271
[self maybeBindHandler:handler.tag toViewWithTag:handler.viewTag withActionType:handler.actionType];
271272
}
272273
}
274+
#endif
273275

274276
#pragma mark Root Views Management
275277

0 commit comments

Comments
 (0)