Invoke -reactBridgeDidFinishTransaction per-batch, not per-flush

Reviewed By: tadeuzagallo, majak

Differential Revision: D2663382

fb-gh-sync-id: f3bd77e0ec8fd4129657fc1c23cc542cf7f0c223
This commit is contained in:
Justin Spahr-Summers 2015-11-17 10:19:48 -08:00 committed by facebook-github-bot-8
parent 2b657003b7
commit 0491142702
1 changed files with 9 additions and 6 deletions

View File

@ -904,6 +904,15 @@ RCT_EXPORT_METHOD(findSubviewIn:(nonnull NSNumber *)reactTag atPoint:(CGPoint)po
_nextLayoutAnimation = nil;
}
[self addUIBlock:^(RCTUIManager *uiManager, __unused NSDictionary<NSNumber *, UIView *> *viewRegistry) {
/**
* TODO(tadeu): Remove it once and for all
*/
for (id<RCTComponent> node in uiManager->_bridgeTransactionListeners) {
[node reactBridgeDidFinishTransaction];
}
}];
[self flushUIBlocks];
}
@ -927,12 +936,6 @@ RCT_EXPORT_METHOD(findSubviewIn:(nonnull NSNumber *)reactTag atPoint:(CGPoint)po
for (dispatch_block_t block in previousPendingUIBlocks) {
block();
}
/**
* TODO(tadeu): Remove it once and for all
*/
for (id<RCTComponent> node in _bridgeTransactionListeners) {
[node reactBridgeDidFinishTransaction];
}
}
@catch (NSException *exception) {
RCTLogError(@"Exception thrown while executing UI block: %@", exception);