From 516eef9abedae574ef5c0e92b90823517a4c5251 Mon Sep 17 00:00:00 2001 From: Oj Date: Mon, 4 Apr 2022 14:05:48 +0100 Subject: [PATCH] [Splash > Backend] Minor source cleanup --- src/splash/index.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/splash/index.js b/src/splash/index.js index 19344d6..9fbac4f 100644 --- a/src/splash/index.js +++ b/src/splash/index.js @@ -14,12 +14,12 @@ let restartRequired = false; let splashWindow, updateTimeout, newUpdater; -exports.initSplash = (startMinimized = false) => { +exports.initSplash = (startMin = false) => { newUpdater = updater.getUpdater(); if (newUpdater == null) initModuleUpdater(); - launchSplashWindow(startMinimized); + launchSplashWindow(startMin); if (newUpdater != null) { updateUntilCurrent(); @@ -77,7 +77,7 @@ const sendState = (status) => { }; -const launchSplashWindow = (startMinimized) => { +const launchSplashWindow = (startMin) => { splashWindow = new BrowserWindow({ width: 300, height: process.platform === 'darwin' ? 300 : 350, @@ -104,7 +104,8 @@ const launchSplashWindow = (startMinimized) => { wc.executeJavaScript(`debug.textContent = '${buildInfo.releaseChannel} ${buildInfo.version}\\nOpenAsar ${oaVersion}'`); } }); - if (!startMinimized) win.once('ready-to-show', () => win.show()); + + if (!startMin) win.once('ready-to-show', () => win.show()); win.loadURL('https://cdn.openasar.dev/splash'); };