mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 11:37:58 +02:00
Bugfixes
This commit is contained in:
parent
0302fee23d
commit
f6a8383d53
2 changed files with 18 additions and 10 deletions
|
@ -569,20 +569,23 @@ function updateLabels(serverState) {
|
||||||
labels.wallet.icon = pendingNotifications[HifiNotificationType.WALLET] ? menuNotificationIcon : null;
|
labels.wallet.icon = pendingNotifications[HifiNotificationType.WALLET] ? menuNotificationIcon : null;
|
||||||
labels.marketplace.icon = pendingNotifications[HifiNotificationType.MARKETPLACE] ? menuNotificationIcon : null;
|
labels.marketplace.icon = pendingNotifications[HifiNotificationType.MARKETPLACE] ? menuNotificationIcon : null;
|
||||||
var onlineUsers = trayNotifications.getOnlineUsers();
|
var onlineUsers = trayNotifications.getOnlineUsers();
|
||||||
if(onlineUsers) {
|
if (onlineUsers) {
|
||||||
labels.people.submenu = [];
|
labels.people.submenu = [];
|
||||||
for (var name in onlineUsers) {
|
for (var name in onlineUsers) {
|
||||||
labels.people.submenu.push({
|
labels.people.submenu.push({
|
||||||
label: name,
|
label: name,
|
||||||
|
enabled: (onlineUsers[name].location != undefined),
|
||||||
click: function () {
|
click: function () {
|
||||||
setNotificationState(HifiNotificationType.GOTO, false);
|
setNotificationState(HifiNotificationType.PEOPLE, false);
|
||||||
StartInterface("hifi://" + onlineUsers[name].location.root.name + onlineUsers[name].location.path);
|
if(onlineUsers[name] && onlineUsers[name].location) {
|
||||||
|
StartInterface("hifi://" + onlineUsers[name].location.root.name + onlineUsers[name].location.path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var currentStories = trayNotifications.getCurrentStories();
|
var currentStories = trayNotifications.getCurrentStories();
|
||||||
if(currentStories) {
|
if (currentStories && currentStories.length) {
|
||||||
labels.goto.submenu = [];
|
labels.goto.submenu = [];
|
||||||
for (var location in currentStories) {
|
for (var location in currentStories) {
|
||||||
labels.goto.submenu.push({
|
labels.goto.submenu.push({
|
||||||
|
|
|
@ -73,11 +73,17 @@ HifiNotification.prototype = {
|
||||||
text = this.data + " of your connections are online."
|
text = this.data + " of your connections are online."
|
||||||
}
|
}
|
||||||
message = "Click to open PEOPLE.";
|
message = "Click to open PEOPLE.";
|
||||||
url="hifiapp:PEOPLE"
|
url="hifiapp:PEOPLE";
|
||||||
} else {
|
} else {
|
||||||
text = this.data.username + " is available in " + this.data.location.root.name + ".";
|
if (this.data.location) {
|
||||||
message = "Click to join them.";
|
text = this.data.username + " is available in " + this.data.location.root.name + ".";
|
||||||
url="hifi://" + this.data.location.root.name + this.data.location.path;
|
message = "Click to join them.";
|
||||||
|
url="hifi://" + this.data.location.root.name + this.data.location.path;
|
||||||
|
} else {
|
||||||
|
text = this.data.username + " is online.";
|
||||||
|
message = "Click to open PEOPLE.";
|
||||||
|
url="hifiapp:PEOPLE";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -433,7 +439,6 @@ HifiNotifications.prototype = {
|
||||||
console.log("Error: unable to get " + url);
|
console.log("Error: unable to get " + url);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
console.log(content);
|
|
||||||
if (!content.total_entries) {
|
if (!content.total_entries) {
|
||||||
_this.menuNotificationCallback(NotificationType.PEOPLE, false);
|
_this.menuNotificationCallback(NotificationType.PEOPLE, false);
|
||||||
_this.onlineUsers = {};
|
_this.onlineUsers = {};
|
||||||
|
@ -445,7 +450,7 @@ HifiNotifications.prototype = {
|
||||||
content.data.users.forEach(function (user) {
|
content.data.users.forEach(function (user) {
|
||||||
currentUsers[user.username] = user;
|
currentUsers[user.username] = user;
|
||||||
if (!(user.username in _this.onlineUsers)) {
|
if (!(user.username in _this.onlineUsers)) {
|
||||||
newUsers.add(user.username);
|
newUsers.add(user);
|
||||||
_this.onlineUsers[user.username] = user;
|
_this.onlineUsers[user.username] = user;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue