Skip to content

Commit

Permalink
Fix file opening from initial load and download window
Browse files Browse the repository at this point in the history
  • Loading branch information
jwbonner committed Oct 5, 2024
1 parent 3b3a78e commit 874944a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1410,7 +1410,7 @@ function downloadSave(files: string[]) {
downloadWindow?.destroy();
downloadStop();
hubWindows[0].focus();
sendMessage(hubWindows[0], "open-files", [savePath]);
sendMessage(hubWindows[0], "open-files", { files: [savePath], merge: false });
}
});
}
Expand Down Expand Up @@ -3214,7 +3214,7 @@ app.whenReady().then(() => {
// Open file if exists
if (firstOpenPath !== null && targetWindow !== null) {
targetWindow.webContents.once("dom-ready", () => {
sendMessage(targetWindow!, "open-files", [firstOpenPath]);
sendMessage(targetWindow!, "open-files", { files: [firstOpenPath], merge: false });
});
}

Expand Down Expand Up @@ -3242,7 +3242,7 @@ app.on("open-file", (_, path) => {
// Already running, create a new window
let window = createHubWindow();
window.webContents.once("dom-ready", () => {
sendMessage(window, "open-files", [path]);
sendMessage(window, "open-files", { files: [path], merge: false });
});
} else {
// Not running yet, open in first window
Expand Down

0 comments on commit 874944a

Please sign in to comment.