stream_list: Hide channels on zoom-in using .hide instead of hide().

This gives us more control, for example `show()` was adding
`display: inline-block;` to channels after unhiding them
which was overriding other code (added for channel folders
in future commits) that was trying to hide the channels.
This commit is contained in:
Evy Kassirer
2025-07-21 22:15:45 -07:00
committed by Tim Abbott
parent 25a75b9ed7
commit c942900b69
3 changed files with 14 additions and 10 deletions

View File

@@ -429,13 +429,13 @@ export function zoom_in_topics(options: {stream_id: number | undefined}): void {
const stream_id = options.stream_id;
if (stream_id_for_elt($elt) === stream_id) {
$elt.show();
$elt.toggleClass("hide", false);
// Add search box for topics list.
$elt.children("div.bottom_left_row").append($(render_filter_topics()));
$("#topic_filter_query").trigger("focus");
topic_list.setup_topic_search_typeahead();
} else {
$elt.hide();
$elt.toggleClass("hide", true);
}
});
}
@@ -450,7 +450,7 @@ export function zoom_out_topics(): void {
});
$("#streams_list").expectOne().removeClass("zoom-in").addClass("zoom-out");
$("#stream_filters li.narrow-filter").show();
$("#stream_filters li.narrow-filter").toggleClass("hide", false);
// Remove search box for topics list from DOM.
$(".filter-topics").remove();
}