From 21714fe1979ccbd62d665f383625f4ece8cf888e Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Wed, 29 Nov 2017 10:27:28 -0800 Subject: [PATCH] Removing RCTUIManager.unsafeFlushUIChangesBeforeBatchEnds experiment Reviewed By: javache Differential Revision: D6432476 fbshipit-source-id: fd02b686cf8bc70a4dfcc02d3bbfdf01c611f351 --- React/Modules/RCTUIManager.h | 11 ----------- React/Modules/RCTUIManager.m | 7 ------- React/Modules/RCTUIManagerObserverCoordinator.h | 3 +-- 3 files changed, 1 insertion(+), 20 deletions(-) diff --git a/React/Modules/RCTUIManager.h b/React/Modules/RCTUIManager.h index 35e41555668d1d..a6c349f6795d98 100644 --- a/React/Modules/RCTUIManager.h +++ b/React/Modules/RCTUIManager.h @@ -149,17 +149,6 @@ RCT_EXTERN NSString *const RCTUIManagerWillUpdateViewsDueToContentSizeMultiplier */ + (UIView *)JSResponder; -/** - * Normally, UI changes are not applied until the complete batch of method - * invocations from JavaScript to native has completed. - * - * Setting this to YES will flush UI changes sooner, which could potentially - * result in inconsistent UI updates. - * - * The default is NO (recommended). - */ -@property (atomic, assign) BOOL unsafeFlushUIChangesBeforeBatchEnds; - /** * In some cases we might want to trigger layout from native side. * React won't be aware of this, so we need to make sure it happens. diff --git a/React/Modules/RCTUIManager.m b/React/Modules/RCTUIManager.m index dc88c187c01234..975f4df19950d3 100644 --- a/React/Modules/RCTUIManager.m +++ b/React/Modules/RCTUIManager.m @@ -1092,13 +1092,6 @@ - (void)synchronouslyUpdateViewOnUIThread:(NSNumber *)reactTag [method invokeWithBridge:_bridge module:componentData.manager arguments:args]; } -- (void)partialBatchDidFlush -{ - if (self.unsafeFlushUIChangesBeforeBatchEnds) { - [self flushUIBlocks]; - } -} - - (void)batchDidComplete { [self _layoutAndMount]; diff --git a/React/Modules/RCTUIManagerObserverCoordinator.h b/React/Modules/RCTUIManagerObserverCoordinator.h index 3d17b7c7bd13cc..5203d510b3d1bc 100644 --- a/React/Modules/RCTUIManagerObserverCoordinator.h +++ b/React/Modules/RCTUIManagerObserverCoordinator.h @@ -40,8 +40,7 @@ - (void)uiManagerDidPerformLayout:(RCTUIManager *)manager; /** - * Called before flushing UI blocks at the end of a batch. Note that this won't - * get called for partial batches when using `unsafeFlushUIChangesBeforeBatchEnds`. + * Called before flushing UI blocks at the end of a batch. * This is called from the UIManager queue. Can be used to add UI operations in that batch. */ - (void)uiManagerWillFlushUIBlocks:(RCTUIManager *)manager;