add target dir to notification

This commit is contained in:
Robin Appelman 2026-04-15 00:01:05 +02:00
commit 0d176e24d5

View file

@ -180,13 +180,16 @@ fn is_part(path: &Path) -> bool {
fn show_notification(source: PathBuf) {
debug!(file = %source.display(), "showing notification for file");
let parent = source.parent().unwrap();
match Notification::new()
.summary("Download moved")
.appname("Galton")
.body(&format!(
"<a href=\"file://{}\">{}</a>",
"<a href=\"file://{}\">{}</a> moved to <a href=\"file://{}\">{}</a>",
source.display(),
source.file_name().unwrap().to_string_lossy()
source.file_name().unwrap().to_string_lossy(),
parent.display(),
parent.file_name().unwrap().to_string_lossy()
))
.hint(Hint::ActionIcons(true))
.hint(Hint::Category("transfer.complete".into()))