From 071817606bb509db068b867599986c4581cf889c Mon Sep 17 00:00:00 2001 From: nilar Date: Tue, 29 Nov 2016 12:11:27 +0100 Subject: [PATCH] Correct tray to close --- src/electron/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/electron/main.js b/src/electron/main.js index 790eea8..41180b6 100644 --- a/src/electron/main.js +++ b/src/electron/main.js @@ -9,6 +9,7 @@ import appMenu from './menu'; // Keep a global reference of the window object, if you don't, the window will // be closed automatically when the JavaScript object is garbage collected. let mainWindow; +let tray; let willQuitApp = false; function createWindow() { @@ -39,7 +40,7 @@ function createWindow() { } }) - appTray(config, clickShow, clickPlayer); + tray = appTray(config, clickShow, clickPlayer); appMenu(config, clickPlayer); }