Track service start and stop events (#1414)

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala authored and GitHub committed 2020-11-18 08:55:57 +02:00
1 parent 960bbe6813
commit d19eb57037
6 files changed
+43 -8

No files matched your search

+6
View File
@@ -85,6 +85,7 @@ export class WindowManager extends Singleton {
await this.mainWindow.loadURL(this.mainUrl);
this.mainWindow.show();
this.splashWindow?.close();
appEventBus.emit({ name: "app", action: "start" })
} catch (err) {
dialog.showErrorBox("ERROR!", err.toString())
}
@@ -156,6 +157,11 @@ export class WindowManager extends Singleton {
this.splashWindow.show();
}
hide() {
if (!this.mainWindow?.isDestroyed()) this.mainWindow.hide();
if (!this.splashWindow.isDestroyed()) this.splashWindow.hide();
}
destroy() {
this.mainWindow.destroy();
this.splashWindow.destroy();