mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01: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.
|
||||
var url = optionalUrl || that.home;
|
||||
var inject = that.inject;
|
||||
if (optionalUrl && optionalInject) {
|
||||
inject = optionalInject;
|
||||
}
|
||||
var inject = optionalInject || that.inject;
|
||||
|
||||
if (that.isQMLUrl(url)) {
|
||||
that.tablet.loadQMLSource(url);
|
||||
|
@ -108,6 +105,7 @@ function AppUi(properties) {
|
|||
};
|
||||
that.notificationPollCallback = that.ignore;
|
||||
that.notificationPollCaresAboutSince = false;
|
||||
that.notificationInitialCallbackMade = false;
|
||||
that.notificationDisplayBanner = function (message) {
|
||||
Window.displayAnnouncement(message);
|
||||
};
|
||||
|
@ -189,6 +187,7 @@ function AppUi(properties) {
|
|||
}
|
||||
console.debug(that.buttonName, 'notification data for processing:', JSON.stringify(notificationData));
|
||||
that.notificationPollCallback(notificationData);
|
||||
that.notificationInitialCallbackMade = true;
|
||||
currentDataPageToRetrieve = 1;
|
||||
concatenatedServerResponse = new Array();
|
||||
} else {
|
||||
|
|
|
@ -823,7 +823,6 @@ function notificationDataProcessPage(data) {
|
|||
}
|
||||
|
||||
var shouldShowDot = false;
|
||||
var firstBannerNotificationShown = false;
|
||||
function notificationPollCallback(onlineUsersArray) {
|
||||
shouldShowDot = onlineUsersArray.length > 0;
|
||||
|
||||
|
@ -835,10 +834,10 @@ function notificationPollCallback(onlineUsersArray) {
|
|||
});
|
||||
|
||||
var message;
|
||||
if (!firstBannerNotificationShown) {
|
||||
message = onlineUsersArray.length + " of your connections are online. Open PEOPLE to join them!";
|
||||
if (!ui.notificationInitialCallbackMade) {
|
||||
message = onlineUsersArray.length + " of your connections " +
|
||||
(onlineUsersArray.length === 1 ? "is" : "are") + " online. Open PEOPLE to join them!";
|
||||
ui.notificationDisplayBanner(message);
|
||||
firstBannerNotificationShown = true;
|
||||
} else {
|
||||
for (var i = 0; i < onlineUsersArray.length; i++) {
|
||||
message = onlineUsersArray[i].username + " is available in " +
|
||||
|
|
Loading…
Reference in a new issue