Skip to content

Commit

Permalink
electron: restore previous workspace
Browse files Browse the repository at this point in the history
The commit fixes logic when determining whether to open a default
window or existing workspace on electron startup. The update now
correctly restores the workspace which would previously never restore
properly.

Signed-off-by: vince-fugnitto <[email protected]>
  • Loading branch information
vince-fugnitto committed Aug 30, 2021
1 parent 0226158 commit 6f98d5c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core/src/electron-main/electron-main-application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,9 @@ export class ElectronMainApplication {
}

protected async handleMainCommand(params: ElectronMainExecutionParams, options: ElectronMainCommandOptions): Promise<void> {
if (options.file === undefined) {
if (params.secondInstance === false) {
await this.openWindowWithWorkspace(''); // restore previous workspace.
} else if (options.file === undefined) {
await this.openDefaultWindow();
} else {
let workspacePath: string | undefined;
Expand Down

0 comments on commit 6f98d5c

Please sign in to comment.