Remove duplicate loop in build_stream_list().

The code removed in this commit added pinned streams to a list
of elems, only to have them added again by the next block of code
(but more concisely).  Through some strange quirk of appendTo() this
never created user-facing bugs, but you could clearly see in the console
that it was doing double work.
This commit is contained in:
Steve Howell 2016-11-10 18:05:26 -08:00 committed by Tim Abbott
parent 06f4857221
commit 16cb2bce8b
1 changed files with 0 additions and 12 deletions

View File

@ -106,18 +106,6 @@ exports.build_stream_list = function () {
previous_unpinned_order = unpinned_streams;
parent.empty();
_.each(pinned_streams, function (stream) {
var li = $(stream_data.get_sub(stream).sidebar_li);
if (sort_recent) {
if (! stream_data.is_active(stream)) {
li.addClass('inactive_stream');
} else {
li.removeClass('inactive_stream');
}
}
elems.push(li.get(0));
});
if (pinned_streams.length > 0) {
_.each(pinned_streams, add_sidebar_li);
elems.push($('<hr class="pinned-stream-split">').get(0));