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.

inbox: Don't search if there is no change in text.

Aman Agrawal3c05bd94a4cc
diff --git a/web/src/inbox_ui.js b/web/src/inbox_ui.js
index 2e2a52530fd..43c851fafd2 100644
--- a/web/src/inbox_ui.js
+++ b/web/src/inbox_ui.js
@@ -459,7 +459,11 @@ export function complete_rerender() {
}
export function search_and_update() {
- search_keyword = $("#inbox-search").val() || "";
+ const new_keyword = $("#inbox-search").val() || "";
+ if (new_keyword === search_keyword) {
+ return;
+ }
+ search_keyword = new_keyword;
current_focus_id = INBOX_SEARCH_ID;
update_triggered_by_user = true;
update();