set 100ms timeout on removing tray to fix crash

This commit is contained in:
Kyle Spearrin 2019-08-05 08:37:20 -04:00
parent 5c1b80ee87
commit 393f6c9c20
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ export class TrayMain {
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);
if (!enableTray) { if (!enableTray) {
this.removeTray(false); setTimeout(() => this.removeTray(false), 100);
} }
}); });
} }