client: Fix flakiness when changing language on desktop

This commit is contained in:
Elian Doran 2024-08-11 14:22:37 +03:00
parent ec3066caee
commit 221fc66ca1
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ class AppContext extends Component {
*/ */
async earlyInit() { async earlyInit() {
await options.initializedPromise; await options.initializedPromise;
initLocale(); await initLocale();
} }
setLayout(layout) { setLayout(layout) {

View File

@ -10,7 +10,7 @@ import glob from "./services/glob.js";
import { t } from "./services/i18n.js"; import { t } from "./services/i18n.js";
bundleService.getWidgetBundlesByParent().then(async widgetBundles => { bundleService.getWidgetBundlesByParent().then(async widgetBundles => {
appContext.earlyInit(); await appContext.earlyInit();
// A dynamic import is required for layouts since they initialize components which require translations. // A dynamic import is required for layouts since they initialize components which require translations.
const DesktopLayout = (await import("./layouts/desktop_layout.js")).default; const DesktopLayout = (await import("./layouts/desktop_layout.js")).default;