diff --git a/React/Modules/RCTUIManager.m b/React/Modules/RCTUIManager.m index bd038b89a81a86..b943fb92fe8e35 100644 --- a/React/Modules/RCTUIManager.m +++ b/React/Modules/RCTUIManager.m @@ -68,8 +68,6 @@ @implementation RCTUIManager // Keyed by viewName NSDictionary *_componentDataByName; - - NSMutableSet> *_bridgeTransactionListeners; } @synthesize bridge = _bridge; @@ -107,7 +105,6 @@ - (void)invalidate self->_rootViewTags = nil; self->_shadowViewRegistry = nil; self->_viewRegistry = nil; - self->_bridgeTransactionListeners = nil; self->_bridge = nil; [[NSNotificationCenter defaultCenter] removeObserver:self]; @@ -145,7 +142,6 @@ - (void)setBridge:(RCTBridge *)bridge _pendingUIBlocks = [NSMutableArray new]; _rootViewTags = [NSMutableSet new]; - _bridgeTransactionListeners = [NSMutableSet new]; _observerCoordinator = [RCTUIManagerObserverCoordinator new]; // Get view managers from bridge @@ -448,10 +444,6 @@ - (void)_purgeChildren:(NSArray> *)children [(id)subview invalidate]; } [registry removeObjectForKey:subview.reactTag]; - - if (registry == (NSMutableDictionary> *)self->_viewRegistry) { - [self->_bridgeTransactionListeners removeObject:subview]; - } }); } } @@ -996,9 +988,7 @@ - (void)_manageChildren:(NSNumber *)containerTag if ([view respondsToSelector:@selector(setBackgroundColor:)]) { ((UIView *)view).backgroundColor = backgroundColor; } - if ([view respondsToSelector:@selector(reactBridgeDidFinishTransaction)]) { - [uiManager->_bridgeTransactionListeners addObject:view]; - } + uiManager->_viewRegistry[reactTag] = view; #if RCT_DEV @@ -1117,15 +1107,6 @@ - (void)_layoutAndMount [self _amendPendingUIBlocksWithStylePropagationUpdateForShadowView:rootView]; } - [self addUIBlock:^(RCTUIManager *uiManager, __unused NSDictionary *viewRegistry) { - /** - * TODO(tadeu): Remove it once and for all - */ - for (id node in uiManager->_bridgeTransactionListeners) { - [node reactBridgeDidFinishTransaction]; - } - }]; - [_observerCoordinator uiManagerWillPerformMounting:self]; [self flushUIBlocksWithCompletion:^{ diff --git a/React/Views/RCTComponent.h b/React/Views/RCTComponent.h index 0941cf9858a66b..1d543ae69f0433 100644 --- a/React/Views/RCTComponent.h +++ b/React/Views/RCTComponent.h @@ -50,11 +50,6 @@ typedef void (^RCTBubblingEventBlock)(NSDictionary *body); */ - (void)didUpdateReactSubviews; -// TODO: Deprecate this -// This method is called after layout has been performed for all views known -// to the RCTViewManager. It is only called on UIViews, not shadow views. -- (void)reactBridgeDidFinishTransaction; - @end // TODO: this is kinda dumb - let's come up with a