diff options
Diffstat (limited to 'services')
| -rw-r--r-- | services/Notifs.qml | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/services/Notifs.qml b/services/Notifs.qml index 1de3805..3a81c5f 100644 --- a/services/Notifs.qml +++ b/services/Notifs.qml @@ -274,18 +274,14 @@ Singleton { function unlock(item: Item): void { locks.delete(item); - - if (closed && locks.size === 0 && root.list.includes(this)) { - root.list.splice(root.list.indexOf(this), 1); - notification?.dismiss(); - destroy(); - } + if (closed) + close(); } function close(): void { closed = true; if (locks.size === 0 && root.list.includes(this)) { - root.list.splice(root.list.indexOf(this), 1); + root.list = root.list.filter(n => n !== this); notification?.dismiss(); destroy(); } |