[Splash > Backend] Minor source cleanup

This commit is contained in:
Ducko 2022-04-04 14:05:48 +01:00
parent 5aec21db30
commit 516eef9abe

View file

@ -14,12 +14,12 @@ let restartRequired = false;
let splashWindow, updateTimeout, newUpdater; let splashWindow, updateTimeout, newUpdater;
exports.initSplash = (startMinimized = false) => { exports.initSplash = (startMin = false) => {
newUpdater = updater.getUpdater(); newUpdater = updater.getUpdater();
if (newUpdater == null) initModuleUpdater(); if (newUpdater == null) initModuleUpdater();
launchSplashWindow(startMinimized); launchSplashWindow(startMin);
if (newUpdater != null) { if (newUpdater != null) {
updateUntilCurrent(); updateUntilCurrent();
@ -77,7 +77,7 @@ const sendState = (status) => {
}; };
const launchSplashWindow = (startMinimized) => { const launchSplashWindow = (startMin) => {
splashWindow = new BrowserWindow({ splashWindow = new BrowserWindow({
width: 300, width: 300,
height: process.platform === 'darwin' ? 300 : 350, height: process.platform === 'darwin' ? 300 : 350,
@ -104,7 +104,8 @@ const launchSplashWindow = (startMinimized) => {
wc.executeJavaScript(`debug.textContent = '${buildInfo.releaseChannel} ${buildInfo.version}\\nOpenAsar ${oaVersion}'`); 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'); win.loadURL('https://cdn.openasar.dev/splash');
}; };