Build the recent subjects list on demand

We previously kept the lists in the DOM for all streams and updated
them all when new messages arrived.  This was very expensive for
large numbers of streams, so we now just build the subject lists on
demand.

(imported from commit 937ad4322ce2014200aeae8645f79875f6af576e)
This commit is contained in:
Zev Benjamin
2013-05-05 20:38:45 -04:00
committed by Tim Abbott
parent 8702d37028
commit 26ea7e0897
3 changed files with 32 additions and 57 deletions

View File

@@ -840,7 +840,7 @@ function get_updates(options) {
process_visible_unread_messages();
notifications.received_messages(messages);
compose.update_faded_messages();
ui.update_recent_subjects();
ui.update_streams_sidebar();
}
if (new_pointer !== undefined
@@ -920,7 +920,7 @@ function load_old_messages(opts) {
add_messages(messages, opts.msg_list);
}
ui.update_recent_subjects();
ui.update_streams_sidebar();
if (opts.cont !== undefined) {
opts.cont(messages);