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

This commit is contained in:
Aman Agrawal 2023-09-15 05:45:44 +00:00 committed by Tim Abbott
parent a0e3f66dc1
commit 3c05bd94a4
1 changed files with 5 additions and 1 deletions

View File

@ -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();