smoother way to show main window after splash

This commit is contained in:
Zamitto
2024-05-20 17:41:57 -03:00
parent 5667c813d9
commit a817a26be1
4 changed files with 14 additions and 7 deletions

View File

@@ -42,7 +42,7 @@ const mockValuesForDebug = async () => {
bytesPerSecond: 4568,
},
});
await sleep(1000);
await sleep(800);
}
sendEvent({ type: "update-downloaded" });

View File

@@ -6,8 +6,7 @@ const { autoUpdater } = updater;
const continueToMainWindow = async (_event: Electron.IpcMainInvokeEvent) => {
autoUpdater.removeAllListeners();
WindowManager.splashWindow?.close();
WindowManager.createMainWindow();
WindowManager.prepareMainWindowAndCloseSplash();
};
registerEvent("continueToMainWindow", continueToMainWindow);

View File

@@ -10,8 +10,7 @@ const restartAndInstallUpdate = async (_event: Electron.IpcMainInvokeEvent) => {
autoUpdater.quitAndInstall(true, true);
} else {
autoUpdater.removeAllListeners();
WindowManager.splashWindow?.close();
WindowManager.createMainWindow();
WindowManager.prepareMainWindowAndCloseSplash();
}
};