From 324eba14d5815883bf46943ccfcdea0c851bb0c1 Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Mon, 24 Jul 2017 09:33:14 -0700 Subject: [PATCH] BREAKING: Removed couple unused notifications from RCTUIManager Reviewed By: javache Differential Revision: D5477733 fbshipit-source-id: 85f90c534fffd6ea9f8f7ad1c0e0fddc1ebdec62 --- React/Modules/RCTUIManager.h | 17 ----------------- React/Modules/RCTUIManager.m | 11 ----------- 2 files changed, 28 deletions(-) diff --git a/React/Modules/RCTUIManager.h b/React/Modules/RCTUIManager.h index 3e3a18035..6e96bc98f 100644 --- a/React/Modules/RCTUIManager.h +++ b/React/Modules/RCTUIManager.h @@ -42,23 +42,6 @@ RCT_EXTERN BOOL RCTIsUIManagerQueue(void); */ RCT_EXTERN NSString *const RCTUIManagerWillUpdateViewsDueToContentSizeMultiplierChangeNotification; -/** - * Posted whenever a new root view is registered with RCTUIManager. The userInfo property - * will contain a RCTUIManagerRootViewKey with the registered root view. - */ -RCT_EXTERN NSString *const RCTUIManagerDidRegisterRootViewNotification; - -/** - * Posted whenever a root view is removed from the RCTUIManager. The userInfo property - * will contain a RCTUIManagerRootViewKey with the removed root view. - */ -RCT_EXTERN NSString *const RCTUIManagerDidRemoveRootViewNotification; - -/** - * Key for the root view property in the above notifications - */ -RCT_EXTERN NSString *const RCTUIManagerRootViewKey; - @class RCTLayoutAnimationGroup; @class RCTUIManagerObserverCoordinator; diff --git a/React/Modules/RCTUIManager.m b/React/Modules/RCTUIManager.m index 9ed8b0ecb..d5be934fa 100644 --- a/React/Modules/RCTUIManager.m +++ b/React/Modules/RCTUIManager.m @@ -54,9 +54,6 @@ static void RCTTraverseViewNodes(id view, void (^block)(id_shadowViewRegistry[shadowView.reactTag] = shadowView; [self->_rootViewTags addObject:reactTag]; }); - - [[NSNotificationCenter defaultCenter] postNotificationName:RCTUIManagerDidRegisterRootViewNotification - object:self - userInfo:@{RCTUIManagerRootViewKey: rootView}]; } - (NSString *)viewNameForReactTag:(NSNumber *)reactTag @@ -746,10 +739,6 @@ RCT_EXPORT_METHOD(removeRootView:(nonnull NSNumber *)rootReactTag) [uiManager _purgeChildren:(NSArray> *)rootView.reactSubviews fromRegistry:(NSMutableDictionary> *)viewRegistry]; [(NSMutableDictionary *)viewRegistry removeObjectForKey:rootReactTag]; - - [[NSNotificationCenter defaultCenter] postNotificationName:RCTUIManagerDidRemoveRootViewNotification - object:uiManager - userInfo:@{RCTUIManagerRootViewKey: rootView}]; }]; }