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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 2 deletions

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();
}
}); });
} }