From 9935bcfa65ccba5b292aefed5c56bab4250bcdb9 Mon Sep 17 00:00:00 2001 From: GirkovArpa <62987001+GirkovArpa@users.noreply.github.com> Date: Sun, 28 Mar 2021 22:25:31 -0500 Subject: [PATCH] :bug: hide tray menu on hide option click When clicking hide, the main window is hidden yet the tray menu remains open. This hides the tray menu so it doesn't remain open. --- tray.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tray.js b/tray.js index d5ac629..af9c2c6 100644 --- a/tray.js +++ b/tray.js @@ -70,7 +70,7 @@ Window.this.on("trayiconclick", function(evt) { // Functions for tray.htm Tray.menu.document.on("click", "#show", () => { view.state = Window.WINDOW_SHOWN; }); - Tray.menu.document.on("click", "#hide", () => { view.state = Window.WINDOW_HIDDEN; }); + Tray.menu.document.on("click", "#hide", () => { view.state = Window.WINDOW_HIDDEN; Tray.menu.state = Window.WINDOW_HIDDEN; }); Tray.menu.document.on("click", "#exit", () => { view.trayIcon("remove"); view.close(); }); Tray.menu.on("activate", (evt) => { if (evt.reason == 0) Tray.menu.state = Window.WINDOW_HIDDEN; }); }