mirror of https://github.com/zulip/zulip.git
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:
parent
06f4857221
commit
16cb2bce8b
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue