From 2eece1ca391495bf801303edc1ab97938ee4967b Mon Sep 17 00:00:00 2001 From: smartfrigde <37928912+smartfrigde@users.noreply.github.com> Date: Sun, 16 Jun 2024 14:48:56 +0200 Subject: [PATCH] chore: remove duplicate code --- src/main.ts | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/src/main.ts b/src/main.ts index 8f163f6..636f8a5 100644 --- a/src/main.ts +++ b/src/main.ts @@ -117,31 +117,7 @@ if (!app.requestSingleInstanceLock()) { } else { iconPath = path.join(import.meta.dirname, "../", "/assets/desktop.png"); } - async function init(): Promise { - if (getConfig("skipSplash") == false) { - void createSplashWindow(); // REVIEW - Awaiting will hang at start - } - if (firstRun == true) { - setLang(new Intl.DateTimeFormat().resolvedOptions().locale); - await createSetupWindow(); - } - switch (getConfig("windowStyle")) { - case "default": - createCustomWindow(); - customTitlebar = true; - break; - case "native": - createNativeWindow(); - break; - case "transparent": - createTransparentWindow(); - break; - default: - createCustomWindow(); - customTitlebar = true; - break; - } - } + // Patch for linux bug to insure things are loaded before window creation (fixes transparency on some linux systems) await new Promise((resolve) => setTimeout(() => (init(), resolve()), 1500)); await installModLoader();