mirror of https://github.com/zulip/zulip.git
Add a new window.bridge call for unread pms
(imported from commit 098c31dbd69c4c020e4c093095e4c78723db0bb1)
This commit is contained in:
parent
eb3281b193
commit
468bbf216d
|
@ -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 () {
|
||||
return window_has_focus;
|
||||
};
|
||||
|
|
|
@ -286,6 +286,7 @@ function update_unread_counts() {
|
|||
// avoid excessive calls to this.
|
||||
stream_list.update_dom_with_unread_counts(res);
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue