buddy_list: Fix missing 'THIS CONVERSATION' section for 'general chat'.

Earlier, 'THIS CONVERSATION' section was missing in the right sidebar
when narrowed to empty string topic.

This commit fixes the bug.
This commit is contained in:
Prakhar Pratyush
2025-03-01 01:05:40 +05:30
committed by Tim Abbott
parent dfe189f189
commit 32263b4b8d
2 changed files with 6 additions and 2 deletions

View File

@@ -99,7 +99,7 @@ export function redraw_user(user_id: number): void {
}
export function rerender_user_sidebar_participants(): void {
if (!narrow_state.stream_id() || !narrow_state.topic()) {
if (!narrow_state.stream_id() || narrow_state.topic() === undefined) {
return;
}

View File

@@ -461,7 +461,11 @@ function get_filtered_user_id_list(
export function get_conversation_participants_callback(): () => Set<number> {
return () => {
if (!narrow_state.stream_id() || !narrow_state.topic() || !message_lists.current) {
if (
!narrow_state.stream_id() ||
narrow_state.topic() === undefined ||
!message_lists.current
) {
return new Set<number>();
}
return message_lists.current.data.participants.visible();