diff --git a/applets/notifications/package/contents/ui/JobDelegate.qml b/applets/notifications/package/contents/ui/JobDelegate.qml --- a/applets/notifications/package/contents/ui/JobDelegate.qml +++ b/applets/notifications/package/contents/ui/JobDelegate.qml @@ -41,6 +41,8 @@ readonly property string label1: getData(jobsSource.data, "label1", '') readonly property bool isSuspended: getData(jobsSource.data, "state", '') === "suspended" + property alias infoMessageVisible: infoLabel.visible + function getData(data, name, defaultValue) { var source = model.name return data[source] ? (data[source][name] ? data[source][name] : defaultValue) : defaultValue; diff --git a/applets/notifications/package/contents/ui/Jobs.qml b/applets/notifications/package/contents/ui/Jobs.qml --- a/applets/notifications/package/contents/ui/Jobs.qml +++ b/applets/notifications/package/contents/ui/Jobs.qml @@ -144,7 +144,24 @@ } Repeater { + id: jobsRepeater model: jobs - delegate: JobDelegate {} + delegate: JobDelegate { + infoMessageVisible: { + if (!infoMessage) { + return false; + } + + // hide info message if it's the same as the previous job, while we don't + // actively group those jobs, it still improves the situation where you + // started copying a couple of different things simultaneously + var previousItem = jobsRepeater.itemAt(index - 1); + if (!previousItem) { + return true; + } + + return previousItem.infoMessage !== infoMessage; + } + } } }