diff --git a/Userland/Applications/Assistant/main.cpp b/Userland/Applications/Assistant/main.cpp index d2b4ea61ab..028893d0a1 100644 --- a/Userland/Applications/Assistant/main.cpp +++ b/Userland/Applications/Assistant/main.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -195,7 +196,7 @@ ErrorOr serenity_main(Main::Arguments arguments) } }; - text_box.on_change = [&]() { + text_box.on_change = Core::debounce([&]() { { Threading::MutexLocker locker(app_state.lock); if (app_state.last_query == text_box.text()) @@ -205,7 +206,8 @@ ErrorOr serenity_main(Main::Arguments arguments) } db.search(text_box.text()); - }; + }, + 5); text_box.on_return_pressed = [&]() { if (!app_state.selected_index.has_value()) return;