Show toast on moving to trash

This commit is contained in:
Jeremy Soller 2024-07-11 14:11:43 -06:00
parent 45711e1734
commit 5c82e72c80
No known key found for this signature in database
GPG key ID: D02FD439211AF56F
4 changed files with 67 additions and 21 deletions

View file

@ -198,6 +198,14 @@ fn copy_unique_path(from: &Path, to: &Path) -> PathBuf {
}
impl Operation {
pub fn toast(&self) -> Option<String> {
match self {
Self::Delete { paths } => Some(fl!("moved-to-trash", items = paths.len())),
//TODO: more toasts
_ => None,
}
}
/// Perform the operation
pub async fn perform(
self,