Merge pull request #14559 from zfox23/MS20161_updatesDot

Fix MS20161: Fix INVENTORY notification dot state
This commit is contained in:
Zach Fox 2018-12-11 13:03:26 -08:00 committed by GitHub
commit 826644ef08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View file

@ -100,6 +100,9 @@ Rectangle {
console.log("Failed to get Available Updates", result.data.message);
} else {
exchangeMoneyButtonContainer.messagesWaiting = result.data.updates.length > 0;
if (!exchangeMoneyButtonContainer.messagesWaiting) {
sendToScript({method: 'clearShouldShowDotUpdates'});
}
}
}
}

View file

@ -536,6 +536,10 @@ function fromQml(message) {
shouldShowDotHistory = false;
ui.messagesWaiting(shouldShowDotUpdates || shouldShowDotHistory);
break;
case 'clearShouldShowDotUpdates':
shouldShowDotUpdates = false;
ui.messagesWaiting(shouldShowDotUpdates || shouldShowDotHistory);
break;
case 'http.request':
// Handled elsewhere, don't log.
break;
@ -578,7 +582,7 @@ function notificationDataProcessPageHistory(data) {
var shouldShowDotUpdates = false;
function notificationPollCallbackUpdates(updatesArray) {
shouldShowDotUpdates = shouldShowDotUpdates || updatesArray.length > 0;
shouldShowDotUpdates = updatesArray.length > 0;
ui.messagesWaiting(shouldShowDotUpdates || shouldShowDotHistory);
if (updatesArray.length > 0) {