fix: toggle window visibility on tray click instead of always showing (#103)

This commit is contained in:
trendwhore
2026-02-17 15:02:17 -05:00
committed by GitHub
parent 2b962c5d06
commit 742a95f3cb
+6 -2
View File
@@ -28,8 +28,12 @@ export function initTray() {
tray.setToolTip("Stoat for Desktop"); tray.setToolTip("Stoat for Desktop");
tray.setImage(trayIcon); tray.setImage(trayIcon);
tray.on("click", () => { tray.on("click", () => {
mainWindow.show(); if (mainWindow.isVisible()) {
mainWindow.focus(); mainWindow.hide();
} else {
mainWindow.show();
mainWindow.focus();
}
}); });
} }