From 1da72b9a97111e2cf749dd6f18e85f98f321bf3d Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 3 Dec 2018 16:06:28 -0500 Subject: [PATCH] adjustments to close to tray changes --- src/electron/baseMenu.ts | 2 +- src/electron/tray.main.ts | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/electron/baseMenu.ts b/src/electron/baseMenu.ts index cf5676c35b..3e7e3d3c59 100644 --- a/src/electron/baseMenu.ts +++ b/src/electron/baseMenu.ts @@ -93,7 +93,7 @@ export class BaseMenu { }, { label: this.i18nService.t('close'), - role: 'quit', + role: 'close', }, ], }; diff --git a/src/electron/tray.main.ts b/src/electron/tray.main.ts index 4ae77343a1..287d233303 100644 --- a/src/electron/tray.main.ts +++ b/src/electron/tray.main.ts @@ -66,12 +66,10 @@ export class TrayMain { this.hideToTray(); } }); - } - if (process.platform === 'win32') { this.windowMain.win.on('close', async (e: Event) => { if (await this.storageService.get(ElectronConstants.enableCloseToTrayKey)) { - if(!this.windowMain.isQuitting){ + if (!this.windowMain.isQuitting) { e.preventDefault(); this.hideToTray(); }