mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 03:48:38 +02:00
Don't show banner when app is open but continue updating data
This commit is contained in:
parent
e75a45af92
commit
6284074ff9
2 changed files with 7 additions and 5 deletions
|
@ -107,7 +107,9 @@ function AppUi(properties) {
|
||||||
that.notificationPollCaresAboutSince = false;
|
that.notificationPollCaresAboutSince = false;
|
||||||
that.notificationInitialCallbackMade = false;
|
that.notificationInitialCallbackMade = false;
|
||||||
that.notificationDisplayBanner = function (message) {
|
that.notificationDisplayBanner = function (message) {
|
||||||
Window.displayAnnouncement(message);
|
if (that.isOpen) {
|
||||||
|
Window.displayAnnouncement(message);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
//
|
//
|
||||||
// END Notification Handling Defaults
|
// END Notification Handling Defaults
|
||||||
|
@ -155,8 +157,8 @@ function AppUi(properties) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// User is "appearing offline", or is offline, or the app is open
|
// User is "appearing offline" or is offline
|
||||||
if (GlobalServices.findableBy === "none" || Account.username === "" || that.isOpen) {
|
if (GlobalServices.findableBy === "none" || Account.username === "") {
|
||||||
that.notificationPollTimeout = Script.setTimeout(that.notificationPoll, that.notificationPollTimeoutMs);
|
that.notificationPollTimeout = Script.setTimeout(that.notificationPoll, that.notificationPollTimeoutMs);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -909,7 +909,7 @@ var onQmlMessageReceived = function onQmlMessageReceived(message) {
|
||||||
break;
|
break;
|
||||||
case 'purchases_availableUpdatesReceived':
|
case 'purchases_availableUpdatesReceived':
|
||||||
shouldShowDot = message.numUpdates > 0;
|
shouldShowDot = message.numUpdates > 0;
|
||||||
ui.messagesWaiting(shouldShowDot);
|
ui.messagesWaiting(shouldShowDot && !ui.isOpen);
|
||||||
break;
|
break;
|
||||||
case 'purchases_updateWearables':
|
case 'purchases_updateWearables':
|
||||||
var currentlyWornWearables = [];
|
var currentlyWornWearables = [];
|
||||||
|
@ -1035,7 +1035,7 @@ function notificationDataProcessPage(data) {
|
||||||
var shouldShowDot = false;
|
var shouldShowDot = false;
|
||||||
function notificationPollCallback(updatesArray) {
|
function notificationPollCallback(updatesArray) {
|
||||||
shouldShowDot = shouldShowDot || updatesArray.length > 0;
|
shouldShowDot = shouldShowDot || updatesArray.length > 0;
|
||||||
ui.messagesWaiting(shouldShowDot);
|
ui.messagesWaiting(shouldShowDot && !ui.isOpen);
|
||||||
|
|
||||||
if (updatesArray.length > 0) {
|
if (updatesArray.length > 0) {
|
||||||
var message;
|
var message;
|
||||||
|
|
Loading…
Reference in a new issue