1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-13 06:43:35 +00:00

minimize event only on windows

This commit is contained in:
Kyle Spearrin
2018-05-08 10:29:51 -04:00
parent 9772acad40
commit 2c8e153931
2 changed files with 9 additions and 7 deletions

2
jslib

Submodule jslib updated: 3270d8bd0e...e7779759f2

View File

@@ -53,12 +53,14 @@ export class TrayMain {
this.showTray(); this.showTray();
} }
this.windowMain.win.on('minimize', async (e: Event) => { if (process.platform === 'win32') {
if (await this.storageService.get<boolean>(ElectronConstants.enableMinimizeToTrayKey)) { this.windowMain.win.on('minimize', async (e: Event) => {
e.preventDefault(); if (await this.storageService.get<boolean>(ElectronConstants.enableMinimizeToTrayKey)) {
this.hideToTray(); e.preventDefault();
} this.hideToTray();
}); }
});
}
this.windowMain.win.on('show', async (e: Event) => { this.windowMain.win.on('show', async (e: Event) => {
const enableTray = await this.storageService.get<boolean>(ElectronConstants.enableTrayKey); const enableTray = await this.storageService.get<boolean>(ElectronConstants.enableTrayKey);