fix-next(css-class): set class before showing window (#8022)

This commit is contained in:
Vasil Chimev
2019-10-28 14:10:40 +02:00
committed by GitHub
parent 640590627b
commit 85b92b0136

View File

@@ -300,14 +300,18 @@ class IOSApplication implements IOSApplicationDefinition {
// setup view as styleScopeHost // setup view as styleScopeHost
rootView._setupAsRootView({}); rootView._setupAsRootView({});
} }
setViewControllerView(rootView); setViewControllerView(rootView);
const haveController = this._window.rootViewController !== null; const haveController = this._window.rootViewController !== null;
this._window.rootViewController = controller; this._window.rootViewController = controller;
setRootViewSystemAppearanceCssClass(rootView);
if (!haveController) { if (!haveController) {
this._window.makeKeyAndVisible(); this._window.makeKeyAndVisible();
} }
setRootViewSystemAppearanceCssClass(rootView);
rootView.on(iosView.traitCollectionColorAppearanceChangedEvent, () => { rootView.on(iosView.traitCollectionColorAppearanceChangedEvent, () => {
const userInterfaceStyle = controller.traitCollection.userInterfaceStyle; const userInterfaceStyle = controller.traitCollection.userInterfaceStyle;
const newSystemAppearance = getSystemAppearanceValue(userInterfaceStyle); const newSystemAppearance = getSystemAppearanceValue(userInterfaceStyle);