From 742a95f3cb820c5b5398c815b7b45017b6b06053 Mon Sep 17 00:00:00 2001 From: trendwhore <66324858+trendwhore@users.noreply.github.com> Date: Tue, 17 Feb 2026 15:02:17 -0500 Subject: [PATCH] fix: toggle window visibility on tray click instead of always showing (#103) --- src/native/tray.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/native/tray.ts b/src/native/tray.ts index 6f96a4e..219afde 100644 --- a/src/native/tray.ts +++ b/src/native/tray.ts @@ -28,8 +28,12 @@ export function initTray() { tray.setToolTip("Stoat for Desktop"); tray.setImage(trayIcon); tray.on("click", () => { - mainWindow.show(); - mainWindow.focus(); + if (mainWindow.isVisible()) { + mainWindow.hide(); + } else { + mainWindow.show(); + mainWindow.focus(); + } }); }