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); console.log("Failed to get Available Updates", result.data.message);
} else { } else {
exchangeMoneyButtonContainer.messagesWaiting = result.data.updates.length > 0; exchangeMoneyButtonContainer.messagesWaiting = result.data.updates.length > 0;
if (!exchangeMoneyButtonContainer.messagesWaiting) {
sendToScript({method: 'clearShouldShowDotUpdates'});
}
} }
} }
} }

View file

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