Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

buddy_list: Fix bug where header didn't show correct participant count.

evykassirerb8261435374c
diff --git a/web/src/buddy_list.ts b/web/src/buddy_list.ts
index 253507d3f87..dc857156d2b 100644
--- a/web/src/buddy_list.ts
+++ b/web/src/buddy_list.ts
@@ -367,7 +367,7 @@ export class BuddyList extends BuddyListConf {
const {total_human_subscribers_count, other_users_count, all_participant_ids} =
this.render_data;
const subscriber_section_user_count =
- total_human_subscribers_count - this.participant_user_ids.length;
+ total_human_subscribers_count - all_participant_ids.size;
const formatted_participants_count = get_formatted_sub_count(all_participant_ids.size);
const formatted_sub_users_count = get_formatted_sub_count(subscriber_section_user_count);
@@ -458,7 +458,7 @@ export class BuddyList extends BuddyListConf {
render_section_header({
id: "buddy-list-participants-section-heading",
header_text: $t({defaultMessage: "In this conversation"}),
- user_count: get_formatted_sub_count(this.participant_user_ids.length),
+ user_count: get_formatted_sub_count(all_participant_ids.size),
is_collapsed: this.participants_is_collapsed,
}),
),
@@ -470,7 +470,7 @@ export class BuddyList extends BuddyListConf {
id: "buddy-list-users-matching-view-section-heading",
header_text,
user_count: get_formatted_sub_count(
- total_human_subscribers_count - this.participant_user_ids.length,
+ total_human_subscribers_count - all_participant_ids.size,
),
is_collapsed: this.users_matching_view_is_collapsed,
}),