[Bootstrap] Fix issues from last commit
This commit is contained in:
parent
a74141f34f
commit
001ca8b49f
|
@ -80,7 +80,11 @@ const startUpdate = async () => {
|
||||||
if (!process.env.OPENASAR_NOSTART) startCore();
|
if (!process.env.OPENASAR_NOSTART) startCore();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let done;
|
||||||
splash.events.once('APP_SHOULD_SHOW', () => {
|
splash.events.once('APP_SHOULD_SHOW', () => {
|
||||||
|
if (done) return;
|
||||||
|
done = true;
|
||||||
|
|
||||||
desktopCore.setMainWindowVisible(!startMin);
|
desktopCore.setMainWindowVisible(!startMin);
|
||||||
|
|
||||||
setTimeout(() => { // Try to update our asar
|
setTimeout(() => { // Try to update our asar
|
||||||
|
|
|
@ -38,7 +38,7 @@ exports.initSplash = (startMin = false) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.focusWindow = () => splashWindow?.focus?.();
|
exports.focusWindow = () => splashWindow?.focus?.();
|
||||||
exports.pageReady = () => destroySplash() && process.nextTick(() => events.emit('APP_SHOULD_SHOW'));
|
exports.pageReady = () => destroySplash() || process.nextTick(() => events.emit('APP_SHOULD_SHOW'));
|
||||||
|
|
||||||
const destroySplash = () => {
|
const destroySplash = () => {
|
||||||
splashWindow?.setSkipTaskbar?.(true);
|
splashWindow?.setSkipTaskbar?.(true);
|
||||||
|
@ -49,8 +49,6 @@ const destroySplash = () => {
|
||||||
splashWindow.hide();
|
splashWindow.hide();
|
||||||
splashWindow.close();
|
splashWindow.close();
|
||||||
splashWindow = null;
|
splashWindow = null;
|
||||||
|
|
||||||
return true;
|
|
||||||
}, 100);
|
}, 100);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue