mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 07:17:43 +02:00
Search for interface should check peer package
Also, retain enabled/disabled state for notifications across restarts
This commit is contained in:
parent
61aef14c64
commit
d851e3994e
2 changed files with 16 additions and 14 deletions
|
@ -146,7 +146,6 @@ function HifiNotifications(config, menuNotificationCallback) {
|
||||||
|
|
||||||
var _menuNotificationCallback = menuNotificationCallback;
|
var _menuNotificationCallback = menuNotificationCallback;
|
||||||
notifier.on('click', function (notifierObject, options) {
|
notifier.on('click', function (notifierObject, options) {
|
||||||
console.log("click.");
|
|
||||||
StartInterface(options.url);
|
StartInterface(options.url);
|
||||||
_menuNotificationCallback(options.notificationType, false);
|
_menuNotificationCallback(options.notificationType, false);
|
||||||
});
|
});
|
||||||
|
@ -185,6 +184,18 @@ HifiNotifications.prototype = {
|
||||||
},
|
},
|
||||||
MARKETPLACE_NOTIFICATION_POLL_TIME_MS);
|
MARKETPLACE_NOTIFICATION_POLL_TIME_MS);
|
||||||
} else {
|
} else {
|
||||||
|
this.stopPolling();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
enabled: function () {
|
||||||
|
return !this.config.get("disableTrayNotifications", false);
|
||||||
|
},
|
||||||
|
stopPolling: function () {
|
||||||
|
this.config.set("storiesNotifySince", this.storiesSince.toISOString());
|
||||||
|
this.config.set("peopleNotifySince", this.peopleSince.toISOString());
|
||||||
|
this.config.set("walletNotifySince", this.walletSince.toISOString());
|
||||||
|
this.config.set("marketplaceNotifySince", this.marketplaceSince.toISOString());
|
||||||
|
|
||||||
if (this.storiesPollTimer) {
|
if (this.storiesPollTimer) {
|
||||||
clearInterval(this.storiesPollTimer);
|
clearInterval(this.storiesPollTimer);
|
||||||
}
|
}
|
||||||
|
@ -197,18 +208,6 @@ HifiNotifications.prototype = {
|
||||||
if (this.marketplacePollTimer) {
|
if (this.marketplacePollTimer) {
|
||||||
clearInterval(this.marketplacePollTimer);
|
clearInterval(this.marketplacePollTimer);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
|
||||||
enabled: function () {
|
|
||||||
return !this.config.get("disableTrayNotifications", false);
|
|
||||||
},
|
|
||||||
stopPolling: function () {
|
|
||||||
this.config.set("storiesNotifySince", this.storiesSince.toISOString());
|
|
||||||
this.config.set("peopleNotifySince", this.peopleSince.toISOString());
|
|
||||||
this.config.set("walletNotifySince", this.walletSince.toISOString());
|
|
||||||
this.config.set("marketplaceNotifySince", this.marketplaceSince.toISOString());
|
|
||||||
|
|
||||||
this.enable(false);
|
|
||||||
},
|
},
|
||||||
_showNotification: function () {
|
_showNotification: function () {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
|
|
|
@ -55,6 +55,9 @@ exports.searchPaths = function(name, binaryType, releaseType) {
|
||||||
|
|
||||||
// check beside the app bundle for the binaries
|
// check beside the app bundle for the binaries
|
||||||
paths.push(path.join(path.dirname(appPath), name + extension));
|
paths.push(path.join(path.dirname(appPath), name + extension));
|
||||||
|
|
||||||
|
// check in the peer bundle for the binaries
|
||||||
|
paths.push(path.join("..", name + extension));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue