diff --git a/modules/sidebar/NotifActionList.qml b/modules/sidebar/NotifActionList.qml index dfc83bd2..84e6103c 100644 --- a/modules/sidebar/NotifActionList.qml +++ b/modules/sidebar/NotifActionList.qml @@ -150,7 +150,7 @@ Item { id: actionInner anchors.centerIn: parent - sourceComponent: action.modelData.isClose || action.modelData.isCopy ? iconBtn : root.notif.hasActionIcons ? iconComp : textComp + sourceComponent: action.modelData.isClose || action.modelData.isCopy ? iconBtn : root.notif?.hasActionIcons ? iconComp : textComp } Component { diff --git a/modules/sidebar/NotifDockList.qml b/modules/sidebar/NotifDockList.qml index a799cf1a..11dde291 100644 --- a/modules/sidebar/NotifDockList.qml +++ b/modules/sidebar/NotifDockList.qml @@ -62,16 +62,7 @@ LazyListView { property int startY function closeAll(): void { - for (const n of Notifs.notClosed.filter(n => n.appName === modelData)) - n.close(); - } - - containmentMask: QtObject { - function contains(p: point): bool { - if (!root.container.contains(notif.mapToItem(root.container, p))) - return false; - return notifInner.contains(p); - } + clearTimer.start(); } LazyListView.preferredHeight: closed ? 0 : notifInner.nonAnimHeight @@ -111,6 +102,24 @@ LazyListView { closeAll(); } + Timer { + id: clearTimer + + interval: 15 + repeat: true + triggeredOnStart: true + onTriggered: { + const notifs = Notifs.notClosed.filter(n => n.appName === notif.modelData); + if (notifs.length === 0) { + stop(); + return; + } + + for (const n of notifs.slice(0, 30)) + n.close(); + } + } + NotifGroup { id: notifInner