right_sidebar: Simplify and shorten heading titles.

Part of fixing #32268.
This commit is contained in:
evykassirer 2024-11-12 21:00:49 -08:00 committed by Tim Abbott
parent 5e211d4ac4
commit 5f124ad117
1 changed files with 6 additions and 13 deletions

View File

@ -440,12 +440,12 @@ export class BuddyList extends BuddyListConf {
const {current_sub, total_human_subscribers_count, other_users_count} = this.render_data;
$(".buddy-list-subsection-header").empty();
// If we're in the mode of hiding headers, that means we're only showing the "other users"
// If we're in the mode of hiding headers, that means we're only showing the "others"
// section, so hide the other two sections.
$("#buddy-list-users-matching-view-container").toggleClass("no-display", hide_headers);
// This is the case where every subscriber is in the participants list. In this case, we
// hide the "others in this channel" section.
// hide the "in this channel" section.
if (
show_participants_list &&
total_human_subscribers_count === this.participant_user_ids.length
@ -457,22 +457,15 @@ export class BuddyList extends BuddyListConf {
return;
}
let header_text;
if (current_sub) {
if (all_participant_ids.size) {
header_text = $t({defaultMessage: "OTHERS IN THIS CHANNEL"});
} else {
header_text = $t({defaultMessage: "IN THIS CHANNEL"});
}
} else {
header_text = $t({defaultMessage: "IN THIS CONVERSATION"});
}
const header_text = current_sub
? $t({defaultMessage: "THIS CHANNEL"})
: $t({defaultMessage: "THIS CONVERSATION"});
$("#buddy-list-participants-container .buddy-list-subsection-header").append(
$(
render_section_header({
id: "buddy-list-participants-section-heading",
header_text: $t({defaultMessage: "IN THIS CONVERSATION"}),
header_text: $t({defaultMessage: "THIS CONVERSATION"}),
user_count: get_formatted_sub_count(all_participant_ids.size),
is_collapsed: this.participants_is_collapsed,
}),