mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
Fix buggy update_streams_sidebar().
If you were narrowed to an unpinned stream, and then pinned it,
we were mostly redrawing the sidebar correctly, but we weren't
setting the active-filter class. Now we accomplish this by
calling maybe_activate_stream_item(), which also reduces some
code duplication. (The new code introduces a bit of extra logic
to do `stream_li.addClass('active-filter')`.
This commit is contained in:
@@ -294,14 +294,9 @@ exports.update_streams_sidebar = function () {
|
||||
return;
|
||||
}
|
||||
|
||||
var op_stream = narrow_state.filter().operands('stream');
|
||||
if (op_stream.length !== 0) {
|
||||
var stream_name = op_stream[0];
|
||||
var stream_id = stream_data.get_stream_id(stream_name);
|
||||
if (stream_id && stream_data.id_is_subscribed(stream_id)) {
|
||||
rebuild_recent_topics(stream_name);
|
||||
}
|
||||
}
|
||||
var filter = narrow_state.filter();
|
||||
|
||||
exports.maybe_activate_stream_item(filter);
|
||||
};
|
||||
|
||||
exports.update_dom_with_unread_counts = function (counts) {
|
||||
|
||||
Reference in New Issue
Block a user