diff options
Diffstat (limited to 'services')
| -rw-r--r-- | services/Notifs.qml | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/services/Notifs.qml b/services/Notifs.qml index b651442..c5f0700 100644 --- a/services/Notifs.qml +++ b/services/Notifs.qml @@ -30,7 +30,10 @@ Singleton { appName: n.appName, image: n.image, expireTimeout: n.expireTimeout, - urgency: n.urgency + urgency: n.urgency, + resident: n.resident, + hasActionIcons: n.hasActionIcons, + actions: n.actions })))); } @@ -73,6 +76,12 @@ Singleton { root.list.push(notifComp.createObject(root, notif)); root.loaded = true; } + onLoadFailed: err => { + if (err === FileViewError.FileNotFound) { + root.loaded = true; + setText("[]"); + } + } } CustomShortcut { @@ -138,7 +147,13 @@ Singleton { property string image: notification?.image ?? "" property real expireTimeout: notification?.expireTimeout ?? Config.notifs.defaultExpireTimeout property int urgency: notification?.urgency ?? NotificationUrgency.Normal - readonly property list<NotificationAction> actions: notification?.actions ?? [] + property bool resident: notification?.resident ?? false + property bool hasActionIcons: notification?.hasActionIcons ?? false + property list<var> actions: notification?.actions.map(a => ({ + identifier: a.identifier, + text: a.text, + invoke: () => a.invoke() + })) ?? [] readonly property Timer timer: Timer { running: true |