From 7a82ca4765713c1d688d9fad35ccba8f5ff8c460 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Fri, 10 Apr 2026 01:22:16 +1000 Subject: [PATCH] fix: account for closing notifs in group preview --- modules/sidebar/NotifGroupList.qml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/modules/sidebar/NotifGroupList.qml b/modules/sidebar/NotifGroupList.qml index 31aa44b5..112db493 100644 --- a/modules/sidebar/NotifGroupList.qml +++ b/modules/sidebar/NotifGroupList.qml @@ -36,7 +36,21 @@ LazyListView { } model: ScriptModel { - values: root.expanded ? root.notifs : root.notifs.slice(0, Config.notifs.groupPreviewNum + 1) + values: { + if (root.expanded) + return root.notifs; + + let count = 0; + let i = 0; + const previewNum = Config.notifs.groupPreviewNum + 1; + while (i < root.notifs.length && count < previewNum) { + if (!(root.notifs[i]?.closed ?? true)) + count++; + i++; + } + + return root.notifs.slice(0, i); + } } delegate: Component {