|
10 | 10 | #ifdef RCT_NEW_ARCH_ENABLED
|
11 | 11 | #import <React/RCTBridge+Private.h>
|
12 | 12 | #import <React/RCTBridge.h>
|
13 |
| -#import <React/RCTSurfacePresenter.h> |
14 | 13 | #import <React/RCTUtils.h>
|
15 | 14 | #import <ReactCommon/CallInvoker.h>
|
16 | 15 | #import <ReactCommon/RCTTurboModule.h>
|
|
34 | 33 | #endif // RCT_NEW_ARCH_ENABLED
|
35 | 34 |
|
36 | 35 | #ifdef RCT_NEW_ARCH_ENABLED
|
37 |
| -@interface RNGestureHandlerModule () <RCTSurfacePresenterObserver, RNGestureHandlerStateManager> |
| 36 | +@interface RNGestureHandlerModule () <RNGestureHandlerStateManager> |
38 | 37 |
|
39 | 38 | @end
|
40 | 39 | #else
|
@@ -68,9 +67,7 @@ - (void)invalidate
|
68 | 67 |
|
69 | 68 | _manager = nil;
|
70 | 69 |
|
71 |
| -#ifdef RCT_NEW_ARCH_ENABLED |
72 |
| - [self.bridge.surfacePresenter removeObserver:self]; |
73 |
| -#else |
| 70 | +#ifndef RCT_NEW_ARCH_ENABLED |
74 | 71 | [self.bridge.uiManager.observerCoordinator removeObserver:self];
|
75 | 72 | #endif // RCT_NEW_ARCH_ENABLED
|
76 | 73 | }
|
@@ -115,9 +112,7 @@ - (void)setBridge:(RCTBridge *)bridge
|
115 | 112 | eventDispatcher:bridge.eventDispatcher];
|
116 | 113 | _operations = [NSMutableArray new];
|
117 | 114 |
|
118 |
| -#ifdef RCT_NEW_ARCH_ENABLED |
119 |
| - [bridge.surfacePresenter addObserver:self]; |
120 |
| -#else |
| 115 | +#ifndef RCT_NEW_ARCH_ENABLED |
121 | 116 | [bridge.uiManager.observerCoordinator addObserver:self];
|
122 | 117 | #endif // RCT_NEW_ARCH_ENABLED
|
123 | 118 | }
|
@@ -243,27 +238,7 @@ - (void)addOperationBlock:(GestureHandlerOperation)operation
|
243 | 238 | [_operations addObject:operation];
|
244 | 239 | }
|
245 | 240 |
|
246 |
| -#pragma mark - RCTSurfacePresenterObserver |
247 |
| - |
248 |
| -#ifdef RCT_NEW_ARCH_ENABLED |
249 |
| - |
250 |
| -- (void)didMountComponentsWithRootTag:(NSInteger)rootTag |
251 |
| -{ |
252 |
| - RCTAssertMainQueue(); |
253 |
| - |
254 |
| - if (_operations.count == 0) { |
255 |
| - return; |
256 |
| - } |
257 |
| - |
258 |
| - NSArray<GestureHandlerOperation> *operations = _operations; |
259 |
| - _operations = [NSMutableArray new]; |
260 |
| - |
261 |
| - for (GestureHandlerOperation operation in operations) { |
262 |
| - operation(self->_manager); |
263 |
| - } |
264 |
| -} |
265 |
| - |
266 |
| -#else |
| 241 | +#ifndef RCT_NEW_ARCH_ENABLED |
267 | 242 |
|
268 | 243 | #pragma mark - RCTUIManagerObserver
|
269 | 244 |
|
|
0 commit comments