Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions studio/src/app/app-root.tsx
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -48,19 +48,19 @@ export class AppRoot {
this.langService = LangService.getInstance();
}

async componentWillLoad() {
if (Build.isBrowser) {
const promises: Promise<void>[] = [
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<void>[] = [
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() {
Expand Down