refactor(gui/views/list): inline delay_hide_copy_confirmation

fn added in 2ca3e05a8e
This commit is contained in:
Rudxain 2025-08-13 18:44:02 -04:00
commit 956d64aa64
No known key found for this signature in database
GPG key ID: 0DAC837DDEF8E96C

View file

@ -376,9 +376,11 @@ impl List {
self.copy_confirmation = true;
Command::batch(vec![
iced::clipboard::write::<Message>(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>(