mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 17:49:27 +02:00
Small changes to AppUI and PAL
This commit is contained in:
parent
23fab0985b
commit
143a059b16
2 changed files with 6 additions and 8 deletions
|
@ -53,10 +53,7 @@ function AppUi(properties) {
|
||||||
};
|
};
|
||||||
that.open = function open(optionalUrl, optionalInject) { // How to open the app.
|
that.open = function open(optionalUrl, optionalInject) { // How to open the app.
|
||||||
var url = optionalUrl || that.home;
|
var url = optionalUrl || that.home;
|
||||||
var inject = that.inject;
|
var inject = optionalInject || that.inject;
|
||||||
if (optionalUrl && optionalInject) {
|
|
||||||
inject = optionalInject;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (that.isQMLUrl(url)) {
|
if (that.isQMLUrl(url)) {
|
||||||
that.tablet.loadQMLSource(url);
|
that.tablet.loadQMLSource(url);
|
||||||
|
@ -108,6 +105,7 @@ function AppUi(properties) {
|
||||||
};
|
};
|
||||||
that.notificationPollCallback = that.ignore;
|
that.notificationPollCallback = that.ignore;
|
||||||
that.notificationPollCaresAboutSince = false;
|
that.notificationPollCaresAboutSince = false;
|
||||||
|
that.notificationInitialCallbackMade = false;
|
||||||
that.notificationDisplayBanner = function (message) {
|
that.notificationDisplayBanner = function (message) {
|
||||||
Window.displayAnnouncement(message);
|
Window.displayAnnouncement(message);
|
||||||
};
|
};
|
||||||
|
@ -189,6 +187,7 @@ function AppUi(properties) {
|
||||||
}
|
}
|
||||||
console.debug(that.buttonName, 'notification data for processing:', JSON.stringify(notificationData));
|
console.debug(that.buttonName, 'notification data for processing:', JSON.stringify(notificationData));
|
||||||
that.notificationPollCallback(notificationData);
|
that.notificationPollCallback(notificationData);
|
||||||
|
that.notificationInitialCallbackMade = true;
|
||||||
currentDataPageToRetrieve = 1;
|
currentDataPageToRetrieve = 1;
|
||||||
concatenatedServerResponse = new Array();
|
concatenatedServerResponse = new Array();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -823,7 +823,6 @@ function notificationDataProcessPage(data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var shouldShowDot = false;
|
var shouldShowDot = false;
|
||||||
var firstBannerNotificationShown = false;
|
|
||||||
function notificationPollCallback(onlineUsersArray) {
|
function notificationPollCallback(onlineUsersArray) {
|
||||||
shouldShowDot = onlineUsersArray.length > 0;
|
shouldShowDot = onlineUsersArray.length > 0;
|
||||||
|
|
||||||
|
@ -835,10 +834,10 @@ function notificationPollCallback(onlineUsersArray) {
|
||||||
});
|
});
|
||||||
|
|
||||||
var message;
|
var message;
|
||||||
if (!firstBannerNotificationShown) {
|
if (!ui.notificationInitialCallbackMade) {
|
||||||
message = onlineUsersArray.length + " of your connections are online. Open PEOPLE to join them!";
|
message = onlineUsersArray.length + " of your connections " +
|
||||||
|
(onlineUsersArray.length === 1 ? "is" : "are") + " online. Open PEOPLE to join them!";
|
||||||
ui.notificationDisplayBanner(message);
|
ui.notificationDisplayBanner(message);
|
||||||
firstBannerNotificationShown = true;
|
|
||||||
} else {
|
} else {
|
||||||
for (var i = 0; i < onlineUsersArray.length; i++) {
|
for (var i = 0; i < onlineUsersArray.length; i++) {
|
||||||
message = onlineUsersArray[i].username + " is available in " +
|
message = onlineUsersArray[i].username + " is available in " +
|
||||||
|
|
Loading…
Reference in a new issue