mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:47:35 +00:00
LibCore+Userland: Make Core::Timer::create_single_shot() return ErrorOr
clang-format sure has some interesting opinions about where to put a method call that comes after a lambda. :thonk:
This commit is contained in:
parent
a15d44f019
commit
a8cf0c9371
20 changed files with 42 additions and 36 deletions
|
@ -233,7 +233,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
GUI::Application::the()->quit();
|
||||
};
|
||||
|
||||
auto update_ui_timer = Core::Timer::create_single_shot(10, [&] {
|
||||
auto update_ui_timer = TRY(Core::Timer::create_single_shot(10, [&] {
|
||||
results_container.remove_all_children();
|
||||
results_layout.set_margins(app_state.visible_result_count ? GUI::Margins { 4, 0, 0, 0 } : GUI::Margins { 0 });
|
||||
|
||||
|
@ -251,7 +251,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
mark_selected_item();
|
||||
Core::deferred_invoke([&] { window->resize(GUI::Desktop::the().rect().width() / 3, {}); });
|
||||
});
|
||||
}));
|
||||
|
||||
db.on_new_results = [&](auto results) {
|
||||
if (results.is_empty())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue