Search for interface should check peer package

Also, retain enabled/disabled state for notifications across restarts
This commit is contained in:
Roxanne Skelly 2018-09-27 11:10:51 -07:00
parent 61aef14c64
commit d851e3994e
2 changed files with 16 additions and 14 deletions

View file

@ -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;

View file

@ -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));
}
}
}