diff --git a/studio/src/app/app-root.tsx b/studio/src/app/app-root.tsx index 0e547a83b..137d7d5b5 100644 --- a/studio/src/app/app-root.tsx +++ b/studio/src/app/app-root.tsx @@ -1,4 +1,4 @@ -import {Build, Component, Element, h, Listen, State} from '@stencil/core'; +import {Component, Element, h, Listen, State} from '@stencil/core'; import {toastController} from '@ionic/core'; @@ -48,19 +48,19 @@ export class AppRoot { this.langService = LangService.getInstance(); } - async componentWillLoad() { - if (Build.isBrowser) { - const promises: Promise[] = [ - this.authService.init(), - this.offlineService.init(), - this.themeService.initDarkModePreference(), - this.colorService.init(), - this.settingsService.init(), - this.langService.init() - ]; - - await Promise.all(promises); - } + componentWillLoad() { + const promises: Promise[] = [ + this.authService.init(), + this.offlineService.init(), + this.themeService.initDarkModePreference(), + this.colorService.init(), + this.settingsService.init(), + this.langService.init() + ]; + + Promise.all(promises).then(() => { + // async componentWillLoad is render blocking and we want to display the app as soon as possible + }); } async componentDidLoad() {