Add max notification shown, implement queue, fix bug where notifications removed in the server locked the queue

This commit is contained in:
Amaro Lopes
2025-10-10 02:14:54 -03:00
parent 3c9d671535
commit 3a3a0b274a
3 changed files with 67 additions and 29 deletions

View File

@@ -21,8 +21,6 @@ PopupWindow {
visible: true
signal clear
mask: Region { item: listView }
MouseArea {
anchors.fill: parent
onClicked: notificationRoot.clear()
@@ -57,7 +55,7 @@ PopupWindow {
anchors.fill: parent
onClicked: {
while (NotificationService.notificationsNumber != 0) {
NotificationService.trackedNotifications.values[0].dismiss();
NotificationService.notificationDismiss(NotificationService.trackedNotifications.get(0).notif)
}
}
}
@@ -71,7 +69,7 @@ PopupWindow {
id: listView
Layout.fillWidth: true
Layout.fillHeight: true
model: NotificationService.globalList
model: NotificationService.trackedNotifications
clip: true
spacing: 5
leftMargin: 10