fix: toggle window visibility on tray click instead of always showing (#103)
This commit is contained in:
parent
2b962c5d06
commit
742a95f3cb
1 changed files with 6 additions and 2 deletions
|
|
@ -28,8 +28,12 @@ export function initTray() {
|
|||
tray.setToolTip("Stoat for Desktop");
|
||||
tray.setImage(trayIcon);
|
||||
tray.on("click", () => {
|
||||
if (mainWindow.isVisible()) {
|
||||
mainWindow.hide();
|
||||
} else {
|
||||
mainWindow.show();
|
||||
mainWindow.focus();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue