Skip to content

Commit

Permalink
Removing RCTUIManager.unsafeFlushUIChangesBeforeBatchEnds experiment
Browse files Browse the repository at this point in the history
Reviewed By: javache

Differential Revision: D6432476

fbshipit-source-id: fd02b686cf8bc70a4dfcc02d3bbfdf01c611f351
  • Loading branch information
shergin authored and facebook-github-bot committed Nov 29, 2017
1 parent cd938d7 commit 21714fe
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 20 deletions.
11 changes: 0 additions & 11 deletions React/Modules/RCTUIManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 0 additions & 7 deletions React/Modules/RCTUIManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
3 changes: 1 addition & 2 deletions React/Modules/RCTUIManagerObserverCoordinator.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 21714fe

Please sign in to comment.