diff --git a/web/src/recent_topics_ui.js b/web/src/recent_topics_ui.js index f57bc83240..074978a4c6 100644 --- a/web/src/recent_topics_ui.js +++ b/web/src/recent_topics_ui.js @@ -541,9 +541,11 @@ export function filters_should_hide_topic(topic_data) { } if (!filters.has("include_muted") && topic_data.type === "stream") { + // We want to show the unmuted topics within muted streams in the recent topics. + const topic_unmuted = Boolean(user_topics.is_topic_unmuted(msg.stream_id, msg.topic)); const topic_muted = Boolean(user_topics.is_topic_muted(msg.stream_id, msg.topic)); const stream_muted = stream_data.is_muted(msg.stream_id); - if (topic_muted || stream_muted) { + if (topic_muted || (stream_muted && !topic_unmuted)) { return true; } } diff --git a/web/tests/recent_topics.test.js b/web/tests/recent_topics.test.js index c2704ee459..0d1d6087ed 100644 --- a/web/tests/recent_topics.test.js +++ b/web/tests/recent_topics.test.js @@ -107,6 +107,7 @@ mock_esm("../src/user_topics", { } return false; }, + is_topic_unmuted: () => false, }); const narrow = mock_esm("../src/narrow", { update_narrow_title: noop,