[Notifications] Don't offer opening files in trash:/

I find it weird that when I've just trashed some files - presumably to get rid
of them - it then offers me to open that file or the trash folder once done.
wilder-5.22
Kai Uwe Broulik 5 years ago
parent 473a151f85
commit 9c2bc25a68
  1. 12
      applets/notifications/package/contents/ui/JobItem.qml

@ -52,12 +52,16 @@ ColumnLayout {
}
// For a single file show actions for it
if (totalFiles === 1) {
return jobItem.jobDetails.descriptionUrl;
// Otherwise the destination folder all of them were copied into
} else {
return jobItem.jobDetails.destUrl;
const url = totalFiles === 1 ? jobItem.jobDetails.descriptionUrl
: jobItem.jobDetails.destUrl;
// Don't offer opening files in Trash
if (url && url.toString().startsWith("trash:")) {
return null;
}
return url;
}
property alias iconContainerItem: jobDragIcon.parent

Loading…
Cancel
Save