1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 14:23:32 +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();
}
if (process.platform === 'win32') {
this.windowMain.win.on('minimize', async (e: Event) => {
if (await this.storageService.get<boolean>(ElectronConstants.enableMinimizeToTrayKey)) {
e.preventDefault();
this.hideToTray();
}
});
}
this.windowMain.win.on('show', async (e: Event) => {
const enableTray = await this.storageService.get<boolean>(ElectronConstants.enableTrayKey);