buddy_list: Show all sections (uncollapse) when searching.

This commit is contained in:
evykassirer 2024-10-25 18:28:02 -07:00 committed by Tim Abbott
parent b826143537
commit 1edf507be9
1 changed files with 16 additions and 1 deletions

View File

@ -287,8 +287,23 @@ export class BuddyList extends BuddyListConf {
$("#buddy-list-users-matching-view-container .view-all-subscribers-link").remove();
$("#buddy-list-other-users-container .view-all-users-link").remove();
if (!buddy_data.get_is_searching_users()) {
if (buddy_data.get_is_searching_users()) {
// Show all sections when searching users
this.set_section_collapse(".buddy-list-section-container", false);
} else {
this.render_view_user_list_links();
this.set_section_collapse(
"#buddy-list-participants-container",
this.participants_is_collapsed,
);
this.set_section_collapse(
"#buddy-list-users-matching-view-container",
this.users_matching_view_is_collapsed,
);
this.set_section_collapse(
"#buddy-list-other-users-container",
this.other_users_is_collapsed,
);
}
// Ensure the "other" section is visible when headers are collapsed,