summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/shell/quickshell/Services/NotificationManager.qml
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2025-09-15 21:36:45 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2025-09-15 21:36:45 +0200
commit9d5fca89bb1a01f2b44979fac32ce97045f99381 (patch)
tree896a19efc6b592582b1be34610eb32409bccde72 /accounts/gkleen@sif/shell/quickshell/Services/NotificationManager.qml
parent48a169afd72c63e8f7c0a896b51150c3e3db2ff3 (diff)
downloadnixos-9d5fca89bb1a01f2b44979fac32ce97045f99381.tar
nixos-9d5fca89bb1a01f2b44979fac32ce97045f99381.tar.gz
nixos-9d5fca89bb1a01f2b44979fac32ce97045f99381.tar.bz2
nixos-9d5fca89bb1a01f2b44979fac32ce97045f99381.tar.xz
nixos-9d5fca89bb1a01f2b44979fac32ce97045f99381.zip
...
Diffstat (limited to 'accounts/gkleen@sif/shell/quickshell/Services/NotificationManager.qml')
-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