Add a new window.bridge call for unread pms

(imported from commit 098c31dbd69c4c020e4c093095e4c78723db0bb1)
This commit is contained in:
Leo Franchi 2013-06-18 18:00:40 -04:00 committed by Luke Faraone
parent eb3281b193
commit 468bbf216d
2 changed files with 7 additions and 0 deletions

View File

@ -103,6 +103,12 @@ exports.update_title_count = function (new_message_count) {
} }
}; };
exports.update_pm_count = function (new_pm_count) {
if (window.bridge !== undefined && window.bridge.updatePMCount !== undefined) {
window.bridge.updatePMCount(new_pm_count);
}
};
exports.window_has_focus = function () { exports.window_has_focus = function () {
return window_has_focus; return window_has_focus;
}; };

View File

@ -286,6 +286,7 @@ function update_unread_counts() {
// avoid excessive calls to this. // avoid excessive calls to this.
stream_list.update_dom_with_unread_counts(res); stream_list.update_dom_with_unread_counts(res);
notifications.update_title_count(res.unread_in_current_view); notifications.update_title_count(res.unread_in_current_view);
notifications.update_pm_count(res.private_message_count);
notifications_bar.update(res.unread_in_current_view); notifications_bar.update(res.unread_in_current_view);
} }