Skip to content

Commit

Permalink
Stop main window from opening every time backend-ready is sent (chaiN…
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyballentine authored Aug 28, 2023
1 parent a45a2d0 commit d3f3e49
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/main/gui/main-window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ export const createMainWindow = async (args: OpenArguments) => {
}
});

let opened = false;
sse.addEventListener('backend-ready', () => {
progressController.submitProgress({
totalProgress: 1,
Expand All @@ -365,9 +366,12 @@ export const createMainWindow = async (args: OpenArguments) => {
return;
}

mainWindow.show();
if (lastWindowSize?.maximized) {
mainWindow.maximize();
if (!opened) {
mainWindow.show();
if (lastWindowSize?.maximized) {
mainWindow.maximize();
}
opened = true;
}
});

Expand Down

0 comments on commit d3f3e49

Please sign in to comment.