[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();
|
||||
});
|
||||
|
||||
let done;
|
||||
splash.events.once('APP_SHOULD_SHOW', () => {
|
||||
if (done) return;
|
||||
done = true;
|
||||
|
||||
desktopCore.setMainWindowVisible(!startMin);
|
||||
|
||||
setTimeout(() => { // Try to update our asar
|
||||
|
|
|
@ -38,7 +38,7 @@ exports.initSplash = (startMin = false) => {
|
|||
};
|
||||
|
||||
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 = () => {
|
||||
splashWindow?.setSkipTaskbar?.(true);
|
||||
|
@ -49,8 +49,6 @@ const destroySplash = () => {
|
|||
splashWindow.hide();
|
||||
splashWindow.close();
|
||||
splashWindow = null;
|
||||
|
||||
return true;
|
||||
}, 100);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue