fix NotificationItem to not override a final property

makes it work with the newest version of Kirigami https://invent.kde.org/frameworks/kirigami/-/merge_requests/1293
Inspired by https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3409

On my machine this makes a fully fresh built plasma-mobile & all its dependencies work again
This commit is contained in:
Luis Büchi 2023-10-20 01:14:26 +00:00 committed by Devin Lin
parent e7524d4977
commit 19de084968

View file

@ -125,17 +125,17 @@ BaseNotificationItem {
Layout.topMargin: Kirigami.Units.smallSpacing
Layout.bottomMargin: Kirigami.Units.smallSpacing
visible: iconItem.active
visible: iconItem.shouldBeShown
Kirigami.Icon {
id: iconItem
// don't show two identical icons
readonly property bool active: valid && source != notificationItem.applicationIconSource
readonly property bool shouldBeShown: valid && source != notificationItem.applicationIconSource
anchors.fill: parent
smooth: true
// don't show a generic "info" icon since this is a notification already
source: notificationItem.icon !== "dialog-information" ? notificationItem.icon : ""
visible: active
visible: shouldBeShown
}
}
}