narrow-state: Filter out "with" operator in narrowed_by_topic_reply.

As the web app is now using the "with" operator for links to channel
topic conversations, we need to filter out that operator when
checking the current narrow state.
This commit is contained in:
Lauryn Menard
2025-03-27 16:32:44 +01:00
committed by Tim Abbott
parent ae66bf287b
commit 24a65c1783

View File

@@ -366,7 +366,7 @@ export function narrowed_by_topic_reply(current_filter: Filter | undefined = fil
if (current_filter === undefined) {
return false;
}
const terms = current_filter.terms();
const terms = current_filter.terms().filter((term) => term.operator !== "with");
return (
terms.length === 2 &&
current_filter.operands("channel").length === 1 &&