sidebar_ui: Fix selection box disappears while navigating to muted row.

This happens since the don't exclude the row which toggles
muted / inactive channels from all_rows, while user is searching
and hence selections box ends up there while navigating to the
muted / inactive channel row.
This commit is contained in:
Aman Agrawal
2025-08-13 23:25:10 +05:30
committed by Tim Abbott
parent 7480510aeb
commit ab75c4f7c9

View File

@@ -487,11 +487,17 @@ function all_rows(): JQuery {
".stream-list-section-container.collapsed .topic-list-item:not(.active-sub-filter).bottom_left_row",
);
// Exclude toggle inactive / muted channels row from the list of rows if user is searching.
const $toggle_inactive_or_muted_channels_row = $(
"#streams_list.is_searching .stream-list-toggle-inactive-or-muted-channels.bottom_left_row",
);
return $all_rows
.not($inactive_or_muted_rows)
.not($collapsed_views)
.not($collapsed_channels)
.not($hidden_topic_rows);
.not($hidden_topic_rows)
.not($toggle_inactive_or_muted_channels_row);
}
class LeftSidebarListCursor extends ListCursor<JQuery> {