feat: ensure all events are loaded before create window

This commit is contained in:
Zamitto 2025-01-29 09:50:59 -03:00
parent 94a13991fa
commit f62c3f9c37
2 changed files with 13 additions and 14 deletions

View file

@ -9,6 +9,7 @@ import resources from "@locales";
import { PythonRPC } from "./services/python-rpc";
import { Aria2 } from "./services/aria2";
import { db, levelKeys } from "./level";
import { loadState } from "./main";
const { autoUpdater } = updater;
@ -57,7 +58,7 @@ app.whenReady().then(async () => {
return net.fetch(url.pathToFileURL(decodeURI(filePath)).toString());
});
await import("./main");
await loadState();
const language = await db.get<string, string>(levelKeys.language, {
valueEncoding: "utf-8",