Show toast on moving to trash
This commit is contained in:
parent
45711e1734
commit
5c82e72c80
4 changed files with 67 additions and 21 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue