NotificationHistory: possible visibility fix for app icons

This commit is contained in:
Ly-sec 2025-09-10 12:52:32 +02:00
parent 2b18ed3c41
commit 291ffac102
2 changed files with 17 additions and 2 deletions

View file

@ -144,10 +144,18 @@ NPanel {
Layout.preferredWidth: 28 * scaling
Layout.preferredHeight: 28 * scaling
Layout.alignment: Qt.AlignVCenter
imagePath: image && image !== "" ? image : ""
imagePath: (image
&& image !== "") ? image : ((appIcon
&& appIcon !== "") ? AppIcons.iconFromName(
appIcon,
"application-x-executable") : AppIcons.iconForAppId(
desktopEntry || appName,
"application-x-executable"))
borderColor: Color.transparent
borderWidth: 0
visible: (image && image !== "")
visible: (image && image !== "") || (appIcon && AppIcons.iconFromName(appIcon,
"application-x-executable") !== "")
|| (AppIcons.iconForAppId(desktopEntry || appName, "application-x-executable") !== "")
}
// Notification content column

View file

@ -161,6 +161,7 @@ Singleton {
"summary": notification.summary,
"body": notification.body,
"appName": resolvedAppName,
"desktopEntry": notification.desktopEntry,
"image": resolvedImage,
"appIcon": notification.appIcon,
"urgency": notification.urgency,
@ -219,7 +220,9 @@ Singleton {
"summary": notification.summary,
"body": notification.body,
"appName": resolvedAppName,
"desktopEntry": notification.desktopEntry || "",
"image": resolvedImage,
"appIcon": notification.appIcon || "",
"urgency": notification.urgency,
"timestamp": new Date()
})
@ -250,7 +253,9 @@ Singleton {
"summary": it.summary || "",
"body": it.body || "",
"appName": it.appName || "",
"desktopEntry": it.desktopEntry || "",
"image": it.image || "",
"appIcon": it.appIcon || "",
"urgency": it.urgency,
"timestamp": ts ? new Date(ts) : new Date()
})
@ -270,7 +275,9 @@ Singleton {
"summary": n.summary,
"body": n.body,
"appName": n.appName,
"desktopEntry": n.desktopEntry,
"image": n.image,
"appIcon": n.appIcon,
"urgency": n.urgency,
"timestamp"// Always persist in milliseconds
: (n.timestamp instanceof Date) ? n.timestamp.getTime(