From d851e3994e78df3492a3740124c92bd908e89d8a Mon Sep 17 00:00:00 2001 From: Roxanne Skelly Date: Thu, 27 Sep 2018 11:10:51 -0700 Subject: [PATCH] Search for interface should check peer package Also, retain enabled/disabled state for notifications across restarts --- .../src/modules/hf-notifications.js | 27 +++++++++---------- server-console/src/modules/path-finder.js | 3 +++ 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/server-console/src/modules/hf-notifications.js b/server-console/src/modules/hf-notifications.js index c7f4e24a17..d487462ba5 100644 --- a/server-console/src/modules/hf-notifications.js +++ b/server-console/src/modules/hf-notifications.js @@ -146,7 +146,6 @@ function HifiNotifications(config, menuNotificationCallback) { var _menuNotificationCallback = menuNotificationCallback; notifier.on('click', function (notifierObject, options) { - console.log("click."); StartInterface(options.url); _menuNotificationCallback(options.notificationType, false); }); @@ -185,18 +184,7 @@ HifiNotifications.prototype = { }, MARKETPLACE_NOTIFICATION_POLL_TIME_MS); } else { - if (this.storiesPollTimer) { - clearInterval(this.storiesPollTimer); - } - if (this.peoplePollTimer) { - clearInterval(this.peoplePollTimer); - } - if (this.walletPollTimer) { - clearInterval(this.walletPollTimer); - } - if (this.marketplacePollTimer) { - clearInterval(this.marketplacePollTimer); - } + this.stopPolling(); } }, enabled: function () { @@ -208,7 +196,18 @@ HifiNotifications.prototype = { this.config.set("walletNotifySince", this.walletSince.toISOString()); this.config.set("marketplaceNotifySince", this.marketplaceSince.toISOString()); - this.enable(false); + if (this.storiesPollTimer) { + clearInterval(this.storiesPollTimer); + } + if (this.peoplePollTimer) { + clearInterval(this.peoplePollTimer); + } + if (this.walletPollTimer) { + clearInterval(this.walletPollTimer); + } + if (this.marketplacePollTimer) { + clearInterval(this.marketplacePollTimer); + } }, _showNotification: function () { var _this = this; diff --git a/server-console/src/modules/path-finder.js b/server-console/src/modules/path-finder.js index 5ecd2c74ff..e9e7e48a5f 100644 --- a/server-console/src/modules/path-finder.js +++ b/server-console/src/modules/path-finder.js @@ -55,6 +55,9 @@ exports.searchPaths = function(name, binaryType, releaseType) { // check beside the app bundle for the binaries paths.push(path.join(path.dirname(appPath), name + extension)); + + // check in the peer bundle for the binaries + paths.push(path.join("..", name + extension)); } } }