mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 00:44:38 +02:00
Prevent text notification from appearing when not necessary
This commit is contained in:
parent
c453594eb7
commit
d487914656
1 changed files with 11 additions and 9 deletions
|
@ -874,16 +874,18 @@ function notificationPollCallback(connectionsArray) {
|
||||||
shouldShowDot: shouldShowDot
|
shouldShowDot: shouldShowDot
|
||||||
});
|
});
|
||||||
|
|
||||||
var message;
|
if (newlyOnlineConnectionsArray.length > 0) {
|
||||||
if (!ui.notificationInitialCallbackMade) {
|
var message;
|
||||||
message = newlyOnlineConnectionsArray.length + " of your connections " +
|
if (!ui.notificationInitialCallbackMade) {
|
||||||
(newlyOnlineConnectionsArray.length === 1 ? "is" : "are") + " online. Open PEOPLE to join them!";
|
message = newlyOnlineConnectionsArray.length + " of your connections " +
|
||||||
ui.notificationDisplayBanner(message);
|
(newlyOnlineConnectionsArray.length === 1 ? "is" : "are") + " online. Open PEOPLE to join them!";
|
||||||
} else {
|
|
||||||
for (i = 0; i < newlyOnlineConnectionsArray.length; i++) {
|
|
||||||
message = newlyOnlineConnectionsArray[i].username + " is available in " +
|
|
||||||
newlyOnlineConnectionsArray[i].location.root.name + ". Open PEOPLE to join them!";
|
|
||||||
ui.notificationDisplayBanner(message);
|
ui.notificationDisplayBanner(message);
|
||||||
|
} else {
|
||||||
|
for (i = 0; i < newlyOnlineConnectionsArray.length; i++) {
|
||||||
|
message = newlyOnlineConnectionsArray[i].username + " is available in " +
|
||||||
|
newlyOnlineConnectionsArray[i].location.root.name + ". Open PEOPLE to join them!";
|
||||||
|
ui.notificationDisplayBanner(message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue