mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 08:14:48 +02:00
Small bugfixes
This commit is contained in:
parent
57c303440b
commit
a76c3f028d
4 changed files with 9 additions and 11 deletions
|
@ -107,7 +107,7 @@ function AppUi(properties) {
|
|||
that.notificationPollCaresAboutSince = false;
|
||||
that.notificationInitialCallbackMade = false;
|
||||
that.notificationDisplayBanner = function (message) {
|
||||
if (that.isOpen) {
|
||||
if (!that.isOpen) {
|
||||
Window.displayAnnouncement(message);
|
||||
}
|
||||
};
|
||||
|
@ -120,6 +120,7 @@ function AppUi(properties) {
|
|||
// Set isOpen, wireEventBridge, set buttonActive as appropriate,
|
||||
// and finally call onOpened() or onClosed() IFF defined.
|
||||
that.setCurrentVisibleScreenMetadata(type, url);
|
||||
|
||||
if (that.checkIsOpen(type, url)) {
|
||||
that.wireEventBridge(true);
|
||||
if (!that.isOpen) {
|
||||
|
|
|
@ -576,9 +576,7 @@ function isReturnedDataEmpty(data) {
|
|||
return historyArray.length === 0;
|
||||
}
|
||||
|
||||
//
|
||||
// Manage the connection between the button and the window.
|
||||
//
|
||||
|
||||
var BUTTON_NAME = "WALLET";
|
||||
var WALLET_QML_SOURCE = "hifi/commerce/wallet/Wallet.qml";
|
||||
var ui;
|
||||
|
|
|
@ -1040,15 +1040,16 @@ function notificationPollCallback(updatesArray) {
|
|||
if (updatesArray.length > 0) {
|
||||
var message;
|
||||
if (!ui.notificationInitialCallbackMade) {
|
||||
message = updatesArray.length + " of your purchased items have updates available. " +
|
||||
"Open MARKET to update.";
|
||||
message = updatesArray.length + " of your purchased items " +
|
||||
(updatesArray.length === 1 ? "has an update " : "have updates ") +
|
||||
"available. Open MARKET to update.";
|
||||
ui.notificationDisplayBanner(message);
|
||||
|
||||
ui.notificationPollCaresAboutSince = true;
|
||||
} else {
|
||||
for (var i = 0; i < updatesArray.length; i++) {
|
||||
message = "Update available for \"" +
|
||||
updatesArray[i].marketplace_item_name + "\"." +
|
||||
updatesArray[i].base_item_title + "\"." +
|
||||
"Open MARKET to update.";
|
||||
ui.notificationDisplayBanner(message);
|
||||
}
|
||||
|
@ -1061,9 +1062,7 @@ function isReturnedDataEmpty(data) {
|
|||
return historyArray.length === 0;
|
||||
}
|
||||
|
||||
//
|
||||
// Manage the connection between the button and the window.
|
||||
//
|
||||
|
||||
var BUTTON_NAME = "MARKET";
|
||||
var MARKETPLACE_URL = METAVERSE_SERVER_URL + "/marketplace";
|
||||
var MARKETPLACE_URL_INITIAL = MARKETPLACE_URL + "?"; // Append "?" to signal injected script that it's the initial page.
|
||||
|
|
|
@ -91,7 +91,7 @@ function notificationPollCallback(userStoriesArray) {
|
|||
ui.messagesWaiting(shouldShowDot && !ui.isOpen);
|
||||
|
||||
if (totalStories > 0 && !ui.isOpen && !ui.notificationInitialCallbackMade) {
|
||||
message = "There " + (totalStories === 1 ? "is " : "are ") + totalStories + "event" +
|
||||
message = "There " + (totalStories === 1 ? "is " : "are ") + totalStories + " event" +
|
||||
(totalStories === 1 ? "" : "s") + " to know about. " +
|
||||
"Open GOTO to see " + (totalStories === 1 ? "it" : "them") + ".";
|
||||
ui.notificationDisplayBanner(message);
|
||||
|
|
Loading…
Reference in a new issue