From dc1d1dfebda22424f9994c681a7e4374d7c7840c Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Tue, 19 Jan 2016 14:40:14 -0800 Subject: [PATCH] Update update notification to only show once --- console/src/main.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/console/src/main.js b/console/src/main.js index 69fcd87ec3..6d9d370986 100644 --- a/console/src/main.js +++ b/console/src/main.js @@ -583,15 +583,19 @@ app.on('ready', function() { if (currentVersion !== null) { const CHECK_FOR_UPDATES_INTERVAL_SECONDS = 60 * 30; + var hasShownUpdateNotification = false; const updateChecker = new updater.UpdateChecker(currentVersion, CHECK_FOR_UPDATES_INTERVAL_SECONDS); updateChecker.on('update-available', function(latestVersion, url) { - notifier.notify({ - icon: trayIcon, - title: 'An update is available!', - message: 'High Fidelity version ' + latestVersion + ' is available', - wait: true, - url: url - }); + if (!hasShownUpdateNotification) { + notifier.notify({ + icon: trayIcon, + title: 'An update is available!', + message: 'High Fidelity version ' + latestVersion + ' is available', + wait: true, + url: url + }); + hasShownUpdateNotification = true; + } }); notifier.on('click', function(notifierObject, options) { console.log("Got click", options.url);