mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 14:35:27 +00:00
Extract notifications.redraw_title().
This sets us up to redraw the window title without having to pass in the unread count, which will be useful for realm name changes. The redraw_title() function is only responsible for rendering stuff, whereas update_title_count() handles the details of caching the count. (imported from commit 67cfb7a273e2a61720ce2bd8d91d73fe1089c813)
This commit is contained in:
@@ -107,7 +107,14 @@ if (window.bridge !== undefined) {
|
|||||||
window.bridge.updateCount(0);
|
window.bridge.updateCount(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.update_title_count = function (new_message_count) {
|
var new_message_count;
|
||||||
|
|
||||||
|
exports.update_title_count = function (count) {
|
||||||
|
new_message_count = count;
|
||||||
|
exports.redraw_title();
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.redraw_title = function () {
|
||||||
// Update window title and favicon to reflect unread messages in current view
|
// Update window title and favicon to reflect unread messages in current view
|
||||||
var n;
|
var n;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user