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:
Steve Howell
2014-02-03 18:20:42 -05:00
parent 30a6fd3bd7
commit 8266ac3cf9

View File

@@ -107,7 +107,14 @@ if (window.bridge !== undefined) {
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
var n;