diff --git a/src/helpers/trayManager.ts b/src/helpers/trayManager.ts index f9b849f4..5efd716a 100644 --- a/src/helpers/trayManager.ts +++ b/src/helpers/trayManager.ts @@ -149,7 +149,14 @@ export class TrayManager { private handleTrayClick() { const mainWindow = getMainWindow(); - mainWindow?.show(); + if (!mainWindow) + return; + + if (mainWindow.isVisible()) { + mainWindow.hide(); + } else { + mainWindow.show(); + } } private destroy(): void {