From 777fdb91b0be2cc05cf0e7b832b073126bb13f3c Mon Sep 17 00:00:00 2001 From: Martin Guillon Date: Wed, 20 Jan 2021 11:30:20 +0100 Subject: [PATCH] fix: all plugins to react on modal page close on ios Also ensure we update statusBar style once the modal closes. --- packages/core/ui/page/index.ios.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/core/ui/page/index.ios.ts b/packages/core/ui/page/index.ios.ts index 76d50e914..a71277fdb 100644 --- a/packages/core/ui/page/index.ios.ts +++ b/packages/core/ui/page/index.ios.ts @@ -129,7 +129,7 @@ class UIViewControllerImpl extends UIViewController { // because changes happen in an interactive transition - IOS will animate between the the states. // If canceled - viewWillAppear will be called for the current page(which is already loaded) and we need to // update the action bar explicitly, so that it is not left styles as the previous page. - owner.actionBar.update(); + owner.updateWithWillAppear(); } } @@ -368,6 +368,12 @@ export class Page extends PageBase { this.actionBar.update(); } } + updateWithWillAppear() { + // this method is important because it allows plugins to react to modal page close + // for example allowing updating status bar background color + this.actionBar.update(); + this.updateStatusBar(); + } public updateStatusBar() { this._updateStatusBarStyle(this.statusBarStyle);