Remove an unneeded call to build_stream_list().

We were calling build_stream_list() twice in succession for
no good reason.  The call to build_stream_list() inside
populate_subscriptions was pulled out to happen right after
its two callers.

(imported from commit 816ae2fd34224d8baf4e4bcccdb670143795bb42)
This commit is contained in:
Steve Howell 2014-01-23 15:19:26 -05:00
parent 4015189094
commit e63d9d32e2
1 changed files with 4 additions and 1 deletions

View File

@ -368,7 +368,6 @@ function populate_subscriptions(subs, subscribed) {
sub_rows.push(sub);
});
stream_list.build_stream_list();
return sub_rows;
}
@ -629,6 +628,10 @@ $(function () {
delete page_params.subbed_info;
delete page_params.unsubbed_info;
// We build the stream_list now. It may get re-built again very shortly
// when new messages come in, but it's fairly quick.
stream_list.build_stream_list();
$("#subscriptions_table").on("submit", "#add_new_subscription", function (e) {
e.preventDefault();