1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:57:44 +00:00

LibCore+Applications: Put timeout parameter first in debounce()

This matches the parameter order for Core::Timer's factory methods,
stops clang-format freaking out so much, and just seems nicer to
me. :^)
This commit is contained in:
Sam Atkins 2023-06-14 14:54:46 +01:00 committed by Andreas Kling
parent 4c349165f2
commit 08edc872aa
5 changed files with 10 additions and 14 deletions

View file

@ -190,7 +190,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
}
};
text_box.on_change = Core::debounce([&]() {
text_box.on_change = Core::debounce(5, [&]() {
{
Threading::MutexLocker locker(app_state.lock);
if (app_state.last_query == text_box.text())
@ -200,8 +200,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
}
db.search(text_box.text());
},
5);
});
text_box.on_return_pressed = [&]() {
if (!app_state.selected_index.has_value())
return;