From 005a27a9cf3916cabb41fe2f1322b43889cf6d8e Mon Sep 17 00:00:00 2001 From: evykassirer Date: Sat, 16 Nov 2024 11:04:39 -0800 Subject: [PATCH] buddy_list: Move header_text calculation to where it's used. Non-functional change. --- web/src/buddy_list.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/web/src/buddy_list.ts b/web/src/buddy_list.ts index f69ad48eb6..307a22c053 100644 --- a/web/src/buddy_list.ts +++ b/web/src/buddy_list.ts @@ -457,10 +457,6 @@ export class BuddyList extends BuddyListConf { return; } - 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({ @@ -476,7 +472,9 @@ export class BuddyList extends BuddyListConf { $( render_section_header({ id: "buddy-list-users-matching-view-section-heading", - header_text, + header_text: current_sub + ? $t({defaultMessage: "THIS CHANNEL"}) + : $t({defaultMessage: "THIS CONVERSATION"}), user_count: get_formatted_sub_count( total_human_subscribers_count - all_participant_ids.size, ),