From b298f18071b94c1d9a00a28bd19aed5eb222949c Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Thu, 10 Jul 2025 12:07:56 -0700 Subject: [PATCH] stream_popover: Don't advertise useless views for general chat channels. These views can only ever show the on topic, so we shouldn't spend space advertising them. --- web/src/stream_popover.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/src/stream_popover.ts b/web/src/stream_popover.ts index b84c4628b4..24e37fba88 100644 --- a/web/src/stream_popover.ts +++ b/web/src/stream_popover.ts @@ -109,10 +109,12 @@ function build_stream_popover(opts: {elt: HTMLElement; stream_id: number}): void const stream_hash = hash_util.channel_url_by_user_setting(stream_id); const show_go_to_channel_feed = user_settings.web_channel_default_view !== - web_channel_default_view_values.channel_feed.code; + web_channel_default_view_values.channel_feed.code && + !stream_data.is_empty_topic_only_channel(stream_id); const show_go_to_list_of_topics = user_settings.web_channel_default_view !== - web_channel_default_view_values.list_of_topics.code; + web_channel_default_view_values.list_of_topics.code && + !stream_data.is_empty_topic_only_channel(stream_id); const stream_unread = unread.unread_count_info_for_stream(stream_id); const stream_unread_count = stream_unread.unmuted_count + stream_unread.muted_count; const has_unread_messages = stream_unread_count > 0;