Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

search_pill: Move user_pill_operators to top of file.

Tim Abbott35bc9d37f1c8
diff --git a/web/src/search_pill.ts b/web/src/search_pill.ts
index bbcdc4b7699..6521233e165 100644
--- a/web/src/search_pill.ts
+++ b/web/src/search_pill.ts
@@ -41,6 +41,9 @@ type SearchPill =
export type SearchPillWidget = InputPillContainer<SearchPill>;
+// These operator types use user pills as operands.
+const user_pill_operators = new Set(["dm", "dm-including", "sender"]);
+
export function create_item_from_search_string(search_string: string): SearchPill | undefined {
const search_term = util.the(Filter.parse(search_string));
if (!Filter.is_valid_search_term(search_term)) {
@@ -166,8 +169,6 @@ function append_user_pill(
pill_widget.clear_text();
}
-const user_pill_operators = new Set(["dm", "dm-including", "sender"]);
-
export function set_search_bar_contents(
search_terms: NarrowTerm[],
pill_widget: SearchPillWidget,