minimize event only on windows
This commit is contained in:
parent
9772acad40
commit
2c8e153931
2
jslib
2
jslib
|
@ -1 +1 @@
|
|||
Subproject commit 3270d8bd0ed46b62262575f5d59fca2414aaf8c7
|
||||
Subproject commit e7779759f25d315d35b20ae85371ebe86fed3eef
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue