Skip to content

Commit 0a8721c

Browse files
sherginfacebook-github-bot
authored andcommitted
Renaming uiManagerWillFlushUIBlocks -> uiManagerWillPerformMounting
Summary: Because it is not simply flushing, it (in the future) is more complex process. And the names should represent logical meaning of the process, not particular implementation details. It also nice to have unified terminology across our reactive UI frameworks. See the next diffs. Reviewed By: rsnara Differential Revision: D6436770 fbshipit-source-id: 0a0b686e8ace89e30f6787a37c0a7965c5af757b
1 parent ecec431 commit 0a8721c

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

Libraries/NativeAnimation/RCTNativeAnimatedModule.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ - (void)invalidate
3434
- (dispatch_queue_t)methodQueue
3535
{
3636
// This module needs to be on the same queue as the UIManager to avoid
37-
// having to lock `_operations` and `_preOperations` since `uiManagerWillFlushUIBlocks`
37+
// having to lock `_operations` and `_preOperations` since `uiManagerWillPerformMounting`
3838
// will be called from that queue.
3939
return RCTGetUIManagerQueue();
4040
}
@@ -198,7 +198,7 @@ - (void)addPreOperationBlock:(AnimatedOperation)operation
198198

199199
#pragma mark - RCTUIManagerObserver
200200

201-
- (void)uiManagerWillFlushUIBlocks:(RCTUIManager *)uiManager
201+
- (void)uiManagerWillPerformMounting:(RCTUIManager *)uiManager
202202
{
203203
if (_preOperations.count == 0 && _operations.count == 0) {
204204
return;

React/Modules/RCTUIManager.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,7 @@ - (void)_layoutAndMount
11261126
}
11271127
}];
11281128

1129-
[_observerCoordinator uiManagerWillFlushUIBlocks:self];
1129+
[_observerCoordinator uiManagerWillPerformMounting:self];
11301130

11311131
[self flushUIBlocks];
11321132
}

React/Modules/RCTUIManagerObserverCoordinator.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
* Called before flushing UI blocks at the end of a batch.
4444
* This is called from the UIManager queue. Can be used to add UI operations in that batch.
4545
*/
46-
- (void)uiManagerWillFlushUIBlocks:(RCTUIManager *)manager;
46+
- (void)uiManagerWillPerformMounting:(RCTUIManager *)manager;
4747

4848
@end
4949

React/Modules/RCTUIManagerObserverCoordinator.mm

+3-3
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ - (void)uiManagerDidPerformLayout:(RCTUIManager *)manager
6363
}
6464
}
6565

66-
- (void)uiManagerWillFlushUIBlocks:(RCTUIManager *)manager
66+
- (void)uiManagerWillPerformMounting:(RCTUIManager *)manager
6767
{
6868
std::lock_guard<std::mutex> lock(_mutex);
6969

7070
for (id<RCTUIManagerObserver> observer in _observers) {
71-
if ([observer respondsToSelector:@selector(uiManagerWillFlushUIBlocks:)]) {
72-
[observer uiManagerWillFlushUIBlocks:manager];
71+
if ([observer respondsToSelector:@selector(uiManagerWillPerformMounting:)]) {
72+
[observer uiManagerWillPerformMounting:manager];
7373
}
7474
}
7575
}

0 commit comments

Comments
 (0)