mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
Previously `NarrowTerm` is only used in our event-handling paths and to a lesser extent in the `detect_narrowed_window` in `view/home.py`. Both of which haven't yet support or handle the `negated` term. Since we're planning to parse a narrow URL into narrow terms (like in `hash_util.ts`) in the web app, we're going to need a `NarrowTerm` dataclass with all three flags. This commit adds the `negated` term to `NarrowTerm` and adds a `NeverNegatedNarrowTerm` which is a subclass of `NarrowTerm` that always has the `negated` flag as `False`, so functionally it is the same as the current `NarrowTerm`.
3.5 KiB
3.5 KiB