Skip to content

Commit

Permalink
Remove references to RCTSurfacePresenter
Browse files Browse the repository at this point in the history
  • Loading branch information
j-piasecki committed Jan 10, 2024
1 parent f536185 commit 93e7300
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions apple/RNGestureHandlerModule.mm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTBridge+Private.h>
#import <React/RCTBridge.h>
#import <React/RCTSurfacePresenter.h>
#import <React/RCTUtils.h>
#import <ReactCommon/CallInvoker.h>
#import <ReactCommon/RCTTurboModule.h>
Expand All @@ -34,7 +33,7 @@
#endif // RCT_NEW_ARCH_ENABLED

#ifdef RCT_NEW_ARCH_ENABLED
@interface RNGestureHandlerModule () <RCTSurfacePresenterObserver, RNGestureHandlerStateManager>
@interface RNGestureHandlerModule () <RNGestureHandlerStateManager>

@end
#else
Expand Down Expand Up @@ -68,9 +67,7 @@ - (void)invalidate

_manager = nil;

#ifdef RCT_NEW_ARCH_ENABLED
[self.bridge.surfacePresenter removeObserver:self];
#else
#ifndef RCT_NEW_ARCH_ENABLED
[self.bridge.uiManager.observerCoordinator removeObserver:self];
#endif // RCT_NEW_ARCH_ENABLED
}
Expand Down Expand Up @@ -115,9 +112,7 @@ - (void)setBridge:(RCTBridge *)bridge
eventDispatcher:bridge.eventDispatcher];
_operations = [NSMutableArray new];

#ifdef RCT_NEW_ARCH_ENABLED
[bridge.surfacePresenter addObserver:self];
#else
#ifndef RCT_NEW_ARCH_ENABLED
[bridge.uiManager.observerCoordinator addObserver:self];
#endif // RCT_NEW_ARCH_ENABLED
}
Expand Down Expand Up @@ -243,8 +238,6 @@ - (void)addOperationBlock:(GestureHandlerOperation)operation
[_operations addObject:operation];
}

#pragma mark - RCTSurfacePresenterObserver

#ifndef RCT_NEW_ARCH_ENABLED

#pragma mark - RCTUIManagerObserver
Expand Down

0 comments on commit 93e7300

Please sign in to comment.