Clear dock/taskbar attention on window focus

Fixes #440

// FREEBIE
This commit is contained in:
lilia 2015-12-03 17:13:38 -08:00
parent dabe51fd68
commit a23e862e62
2 changed files with 8 additions and 0 deletions

View file

@ -137,6 +137,13 @@
w.clearAttention();
w.drawAttention();
}
},
clearAttention: function(window_id) {
if (chrome.app.window) {
var w = chrome.app.window.get(window_id);
w.clearAttention();
}
}
};

View file

@ -57,6 +57,7 @@
});
appWindow.contentWindow.addEventListener('focus', function() {
inboxFocused = true;
extension.windows.clearAttention(inboxWindowId);
});
// close the inbox if background.html is refreshed