From 956d64aa6458b673d0faa65386c982f9933ec5dc Mon Sep 17 00:00:00 2001 From: Rudxain <76864299+Rudxain@users.noreply.github.com> Date: Wed, 13 Aug 2025 18:44:02 -0400 Subject: [PATCH] refactor(gui/views/list): inline `delay_hide_copy_confirmation` fn added in 2ca3e05a8e7da5c3d62d90e6f64c44bedb3c5265 --- src/gui/views/list.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/gui/views/list.rs b/src/gui/views/list.rs index cd1def5..a099de9 100644 --- a/src/gui/views/list.rs +++ b/src/gui/views/list.rs @@ -376,9 +376,11 @@ impl List { self.copy_confirmation = true; Command::batch(vec![ iced::clipboard::write::(err), - Command::perform(Self::delay_hide_copy_confirmation(), |()| { - Message::HideCopyConfirmation - }), + Command::perform( + // intentional delay + async { std::thread::sleep(std::time::Duration::from_secs(1)) }, + |()| Message::HideCopyConfirmation, + ), ]) } Message::HideCopyConfirmation => { @@ -926,10 +928,6 @@ impl List { } } } - - async fn delay_hide_copy_confirmation() { - std::thread::sleep(std::time::Duration::from_secs(1)); - } } fn error_view<'a>(