sidebar/notifs: sort groups by latest notif

This commit is contained in:
2 * r + 2 * t 2025-09-20 00:06:08 +10:00
parent ccc398b2a0
commit c6b91f1299

View file

@ -97,7 +97,10 @@ Item {
spacing: Appearance.spacing.small
model: ScriptModel {
values: [...new Set(Notifs.list.filter(n => !n.closed).map(n => n.appName))].reverse()
values: {
const list = Notifs.list.filter(n => !n.closed).sort((a, b) => b.time - a.time).map(n => [n.appName, null]);
return [...new Map(list).keys()];
}
}
StyledScrollBar.vertical: StyledScrollBar {