fix(ios): tab page navigation when showing dialog messages (#10075)

This commit is contained in:
Douglas Machado
2022-11-07 22:48:02 -03:00
committed by GitHub
parent 5f3f1ace28
commit 0f7e4ed0f3

View File

@ -118,7 +118,7 @@ export class Frame extends FrameBase {
if (!this._currentEntry) { if (!this._currentEntry) {
// Update action-bar with disabled animations before the initial navigation. // Update action-bar with disabled animations before the initial navigation.
this._updateActionBar(backstackEntry.resolvedPage, true); this._updateActionBar(backstackEntry.resolvedPage, true);
this._ios.controller.pushViewControllerAnimated(viewController, animated); this.pushViewControllerAnimated(viewController, animated);
if (Trace.isEnabled()) { if (Trace.isEnabled()) {
Trace.write(`${this}.pushViewControllerAnimated(${viewController}, ${animated}); depth = ${navDepth}`, Trace.categories.Navigation); Trace.write(`${this}.pushViewControllerAnimated(${viewController}, ${animated}); depth = ${navDepth}`, Trace.categories.Navigation);
} }
@ -180,6 +180,17 @@ export class Frame extends FrameBase {
} }
} }
private pushViewControllerAnimated(viewController: UIViewController, animated: boolean) {
let transitionCoordinator = this._ios.controller.transitionCoordinator;
if (transitionCoordinator) {
transitionCoordinator.animateAlongsideTransitionCompletion(null, () => {
this._ios.controller.pushViewControllerAnimated(viewController, animated);
});
} else {
this._ios.controller.pushViewControllerAnimated(viewController, animated);
}
}
public _goBackCore(backstackEntry: BackstackEntry) { public _goBackCore(backstackEntry: BackstackEntry) {
super._goBackCore(backstackEntry); super._goBackCore(backstackEntry);
navDepth = backstackEntry[NAV_DEPTH]; navDepth = backstackEntry[NAV_DEPTH];