notifications: centralize icon resolution in NotifItem.resolvedIcon, fix lock pill grouping and missing fallbacks
This commit is contained in:
parent
99b63a2756
commit
d4001f7900
4 changed files with 23 additions and 32 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Services.Notifications
|
||||
import "." as S
|
||||
|
||||
|
|
@ -20,6 +21,17 @@ QtObject {
|
|||
property var actions: []
|
||||
property real time: Date.now()
|
||||
|
||||
// Resolved icon URL - checks image first, then resolves appIcon via XDG lookup
|
||||
readonly property string resolvedIcon: {
|
||||
if (image)
|
||||
return image;
|
||||
if (!appIcon)
|
||||
return "";
|
||||
if (appIcon.startsWith("/") || appIcon.startsWith("file://"))
|
||||
return appIcon;
|
||||
return Quickshell.iconPath(appIcon, "dialog-information");
|
||||
}
|
||||
|
||||
// Expire timer — owned by this item, not dynamically created
|
||||
readonly property Timer _expireTimer: Timer {
|
||||
running: false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue