diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-09-20 15:47:44 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-09-20 15:47:44 +1000 |
| commit | 89d46c1b2fd1a35a3229511f745205ac4956bf9e (patch) | |
| tree | aa5c7faed9c627b6933cdc533b540eb695af9dd9 /modules/lock | |
| parent | sidebar/notifs: sort groups by latest notif (diff) | |
| download | caelestia-shell-89d46c1b2fd1a35a3229511f745205ac4956bf9e.tar.gz caelestia-shell-89d46c1b2fd1a35a3229511f745205ac4956bf9e.tar.bz2 caelestia-shell-89d46c1b2fd1a35a3229511f745205ac4956bf9e.zip | |
sidebar/notifs: better anims + misc fixes
Diffstat (limited to 'modules/lock')
| -rw-r--r-- | modules/lock/NotifDock.qml | 5 | ||||
| -rw-r--r-- | modules/lock/NotifGroup.qml | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/modules/lock/NotifDock.qml b/modules/lock/NotifDock.qml index ac40319..7551e68 100644 --- a/modules/lock/NotifDock.qml +++ b/modules/lock/NotifDock.qml @@ -84,7 +84,10 @@ ColumnLayout { clip: true model: ScriptModel { - values: [...new Set(Notifs.list.map(notif => notif.appName))].reverse() + values: { + const list = Notifs.notClosed.map(n => [n.appName, null]); + return [...new Map(list).keys()]; + } } delegate: NotifGroup {} diff --git a/modules/lock/NotifGroup.qml b/modules/lock/NotifGroup.qml index 15342d4..2a08c26 100644 --- a/modules/lock/NotifGroup.qml +++ b/modules/lock/NotifGroup.qml @@ -16,7 +16,7 @@ StyledRect { required property string modelData - readonly property list<var> notifs: Notifs.list.filter(notif => notif.appName === modelData).reverse() + readonly property list<var> notifs: Notifs.list.filter(notif => notif.appName === modelData) readonly property string image: notifs.find(n => n.image.length > 0)?.image ?? "" readonly property string appIcon: notifs.find(n => n.appIcon.length > 0)?.appIcon ?? "" readonly property string urgency: notifs.some(n => n.urgency === NotificationUrgency.Critical) ? "critical" : notifs.some(n => n.urgency === NotificationUrgency.Normal) ? "normal" : "low" @@ -227,7 +227,7 @@ StyledRect { ParallelAnimation { running: notif.modelData.closed - onFinished: notif.modelData.lock(notif) + onFinished: notif.modelData.unlock(notif) Anim { target: notif |