From 6896fe42fa571bd7fd59225901eca39090f14fa1 Mon Sep 17 00:00:00 2001 From: retrozinndev Date: Thu, 10 Apr 2025 17:12:24 -0300 Subject: [PATCH] :boom: fix(ags/scripts/notifications): `clearHistory()` not clearing all of the notification history --- ags/scripts/notifications.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ags/scripts/notifications.ts b/ags/scripts/notifications.ts index 0767f64..a17c708 100644 --- a/ags/scripts/notifications.ts +++ b/ags/scripts/notifications.ts @@ -147,8 +147,9 @@ class Notifications extends GObject.Object { } public clearHistory(): void { - this.#history.reverse().map((notif) => { - this.#history.pop() + const hist = this.#history.reverse(); + hist.map((notif) => { + this.#history = this.history.filter((n) => n.id !== notif.id); this.emit("history-removed", notif.id); this.notify("history"); });