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:
2
jslib
2
jslib
Submodule jslib updated: 3270d8bd0e...e7779759f2
@@ -53,12 +53,14 @@ export class TrayMain {
|
||||
this.showTray();
|
||||
}
|
||||
|
||||
this.windowMain.win.on('minimize', async (e: Event) => {
|
||||
if (await this.storageService.get<boolean>(ElectronConstants.enableMinimizeToTrayKey)) {
|
||||
e.preventDefault();
|
||||
this.hideToTray();
|
||||
}
|
||||
});
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user