fix(application): explicitly pass rootView to initRootView (#10345)

fixes occasional crashes when resuming the app.
This commit is contained in:
Jason Cassidy
2023-07-18 16:47:50 +01:00
committed by GitHub
parent 6effd554f2
commit bd8e1b8e79
3 changed files with 5 additions and 5 deletions

View File

@ -364,8 +364,8 @@ export class ApplicationCommon {
// rest of implementation is platform specific
}
initRootView() {
this.setRootViewCSSClasses(this.getRootView());
initRootView(rootView: View) {
this.setRootViewCSSClasses(rootView);
initAccessibilityCssHelper();
initAccessibilityFontScale();
}

View File

@ -157,7 +157,7 @@ export class iOSApplication extends ApplicationCommon implements IiOSApplication
visibleVC.presentViewControllerAnimatedCompletion(controller, true, null);
}
this.initRootView();
this.initRootView(rootView);
this.notifyAppStarted();
}
@ -349,7 +349,7 @@ export class iOSApplication extends ApplicationCommon implements IiOSApplication
this._window.makeKeyAndVisible();
}
this.initRootView();
this.initRootView(rootView);
rootView.on(IOSHelper.traitCollectionColorAppearanceChangedEvent, () => {
const userInterfaceStyle = controller.traitCollection.userInterfaceStyle;

View File

@ -1378,7 +1378,7 @@ class ActivityCallbacksImplementation implements AndroidActivityCallbacks {
this._rootView = rootView;
// sets root classes once rootView is ready...
Application.initRootView();
Application.initRootView(rootView);
}
}