summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/shell/quickshell/Services
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/gkleen@sif/shell/quickshell/Services')
-rw-r--r--accounts/gkleen@sif/shell/quickshell/Services/NotificationManager.qml4
1 files changed, 4 insertions, 0 deletions
diff --git a/accounts/gkleen@sif/shell/quickshell/Services/NotificationManager.qml b/accounts/gkleen@sif/shell/quickshell/Services/NotificationManager.qml
index c0e9458e..531d26c3 100644
--- a/accounts/gkleen@sif/shell/quickshell/Services/NotificationManager.qml
+++ b/accounts/gkleen@sif/shell/quickshell/Services/NotificationManager.qml
@@ -58,6 +58,7 @@ Singleton {
58 { "test": { "appName": "Element" }, "group-by": [ "summary" ] } 58 { "test": { "appName": "Element" }, "group-by": [ "summary" ] }
59 ]; 59 ];
60 60
61 property int historyLimit: 100
61 property var history: [] 62 property var history: []
62 63
63 Component { 64 Component {
@@ -147,6 +148,9 @@ Singleton {
147 } 148 }
148 149
149 function onNotificationClosed(notification, reason) { 150 function onNotificationClosed(notification, reason) {
151 while (root.history.length >= root.historyLimit)
152 root.history.shift();
153
150 root.history.push({ 154 root.history.push({
151 lock: notificationLock.createObject(root, { locked: true, object: notification }), 155 lock: notificationLock.createObject(root, { locked: true, object: notification }),
152 notification: notification 156 notification: notification