From c44022d329ff15b68a8a2e5a0100c5d991067fe4 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Tue, 19 Jan 2016 14:15:29 -0800 Subject: [PATCH] Move update checker to not start until after d/l content set --- console/src/main.js | 57 ++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/console/src/main.js b/console/src/main.js index 4eb83be0e6..cd43d3c2a8 100644 --- a/console/src/main.js +++ b/console/src/main.js @@ -569,40 +569,39 @@ app.on('ready', function() { tray.popUpContextMenu(tray.menu); }); - // if (buildInfo.releaseType == 'PRODUCTION') { - if (true) { // TODO: remove, uncomment line above - var currentVersion = null; - try { - currentVersion = parseInt(buildInfo.buildIdentifier); - } catch (e) { - } - currentVersion = 0; // TODO: remove - - if (currentVersion !== null) { - const CHECK_FOR_UPDATES_INTERVAL_SECONDS = 20; - 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 - }); - }); - notifier.on('click', function(notifierObject, options) { - console.log("Got click", options.url); - shell.openExternal(options.url); - }); - } - } - - updateTrayMenu(ProcessGroupStates.STOPPED); maybeInstallDefaultContentSet(function() { maybeShowSplash(); + // if (buildInfo.releaseType == 'PRODUCTION') { + if (true) { // TODO: remove, uncomment line above + var currentVersion = null; + try { + currentVersion = parseInt(buildInfo.buildIdentifier); + } catch (e) { + } + currentVersion = 0; // TODO: remove + + if (currentVersion !== null) { + const CHECK_FOR_UPDATES_INTERVAL_SECONDS = 20; + 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 + }); + }); + notifier.on('click', function(notifierObject, options) { + console.log("Got click", options.url); + shell.openExternal(options.url); + }); + } + } + if (dsPath && acPath) { domainServer = new Process('domain-server', dsPath, ["--get-temp-name"], logPath); acMonitor = new ACMonitorProcess('ac-monitor', acPath, ['-n6',