refactoring: Let activity.js manage its own unread counts.

This change breaks a needless dependency of activity.js on
stream_list.js.
This commit is contained in:
Steve Howell
2016-11-11 11:48:13 -08:00
committed by Tim Abbott
parent f3373d62e1
commit 47ef26fa55
3 changed files with 46 additions and 16 deletions

View File

@@ -186,6 +186,7 @@ exports.update_unread_counts = function () {
// Side effects from here down:
// This updates some DOM elements directly, so try to
// avoid excessive calls to this.
activity.update_dom_with_unread_counts(res);
stream_list.update_dom_with_unread_counts(res);
notifications.update_title_count(res.home_unread_messages);
notifications.update_pm_count(res.private_message_count);