Get TrashItems when deleting

This commit is contained in:
Jeremy Soller 2024-07-11 16:20:59 -06:00
parent f4975391ac
commit eba72e131a
No known key found for this signature in database
GPG key ID: D02FD439211AF56F
3 changed files with 5 additions and 5 deletions

View file

@ -307,7 +307,7 @@ impl Operation {
pub fn toast(&self) -> Option<String> {
match self {
Self::Delete { paths } => Some(self.completed_text()),
Self::Delete { .. } => Some(self.completed_text()),
//TODO: more toasts
_ => None,
}
@ -432,10 +432,11 @@ impl Operation {
let total = paths.len();
let mut count = 0;
for path in paths {
tokio::task::spawn_blocking(|| trash::delete(path))
let items_opt = tokio::task::spawn_blocking(|| trash::delete(path))
.await
.map_err(err_str)?
.map_err(err_str)?;
//TODO: items_opt allows for easy restore
count += 1;
let _ = msg_tx
.lock()