From 5b153fde8f31061099ed5844f809068f2c6c4513 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Fri, 3 Apr 2026 20:47:13 +1100 Subject: [PATCH] fix: batch clear all notifs to prevent blocking --- modules/sidebar/NotifDock.qml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/modules/sidebar/NotifDock.qml b/modules/sidebar/NotifDock.qml index 177b6147..dd88ec3d 100644 --- a/modules/sidebar/NotifDock.qml +++ b/modules/sidebar/NotifDock.qml @@ -149,14 +149,24 @@ Item { id: clearTimer repeat: true + triggeredOnStart: true interval: Math.max(15, Math.min(80, 69.8 - 12.3 * Math.log(Notifs.notClosed.length))) onTriggered: { const first = Notifs.notClosed[0]; - if (first) { - for (const n of Notifs.notClosed.filter(n => n.appName === first.appName)) - n.close(); - } else { + if (!first) { stop(); + return; + } + + const appName = first.appName; + let cleared = 0; + for (const n of Notifs.notClosed.filter(n => n.appName === appName)) { + n.close(); + cleared++; + if (cleared > 30) { + interval = 5; + return; + } } } }