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

Userland: Use Core::Timer::create_foo() factory functions where possible

This commit is contained in:
Sam Atkins 2023-01-11 20:00:46 +00:00 committed by Andreas Kling
parent 6edc0cf5ab
commit e181b1cb82
12 changed files with 37 additions and 51 deletions

View file

@ -948,12 +948,12 @@ void WindowFrame::handle_menu_mouse_event(Menu& menu, MouseEvent const& event)
void WindowFrame::start_flash_animation()
{
if (!m_flash_timer) {
m_flash_timer = Core::Timer::construct(100, [this] {
m_flash_timer = Core::Timer::create_repeating(100, [this] {
VERIFY(m_flash_counter);
invalidate_titlebar();
if (!--m_flash_counter)
m_flash_timer->stop();
});
}).release_value_but_fixme_should_propagate_errors();
}
m_flash_counter = 8;
m_flash_timer->start();