|
@@ -175,13 +175,17 @@ static NSString* const setDefaultOptions = @"setDefaultOptions";
|
175
|
175
|
for (UIViewController<RNNLayoutProtocol>* viewController in childViewControllers) {
|
176
|
176
|
[viewController renderTreeAndWait:NO perform:nil];
|
177
|
177
|
}
|
178
|
|
- RNNNavigationOptions* options = childViewControllers.lastObject.resolveOptions;
|
|
178
|
+ UIViewController *newVC = childViewControllers.lastObject;
|
179
|
179
|
UIViewController *fromVC = [RNNLayoutManager findComponentForId:componentId];
|
|
180
|
+ RNNNavigationOptions* options = newVC.resolveOptions;
|
180
|
181
|
__weak typeof(RNNEventEmitter*) weakEventEmitter = _eventEmitter;
|
181
|
|
- [_stackManager setStackChildren:childViewControllers fromViewController:fromVC animated:[options.animations.setStackRoot.enable getWithDefaultValue:YES] completion:^{
|
182
|
|
- [weakEventEmitter sendOnNavigationCommandCompletion:setStackRoot commandId:commandId params:@{@"componentId": componentId}];
|
183
|
|
- completion();
|
184
|
|
- } rejection:rejection];
|
|
182
|
+
|
|
183
|
+ [newVC renderTreeAndWait:([options.animations.setStackRoot.waitForRender getWithDefaultValue:NO]) perform:^{
|
|
184
|
+ [_stackManager setStackChildren:childViewControllers fromViewController:fromVC animated:[options.animations.setStackRoot.enable getWithDefaultValue:YES] completion:^{
|
|
185
|
+ [weakEventEmitter sendOnNavigationCommandCompletion:setStackRoot commandId:commandId params:@{@"componentId": componentId}];
|
|
186
|
+ completion();
|
|
187
|
+ } rejection:rejection];
|
|
188
|
+ }];
|
185
|
189
|
}
|
186
|
190
|
|
187
|
191
|
- (void)pop:(NSString*)componentId commandId:(NSString*)commandId mergeOptions:(NSDictionary*)mergeOptions completion:(RNNTransitionCompletionBlock)completion rejection:(RCTPromiseRejectBlock)rejection {
|