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>(