💥 fix(ags/scripts/notifications): clearHistory() not clearing all of the notification history

This commit is contained in:
retrozinndev
2025-04-10 17:12:24 -03:00
parent 940123d3f3
commit 6896fe42fa
+3 -2
View File
@@ -147,8 +147,9 @@ class Notifications extends GObject.Object {
} }
public clearHistory(): void { public clearHistory(): void {
this.#history.reverse().map((notif) => { const hist = this.#history.reverse();
this.#history.pop() hist.map((notif) => {
this.#history = this.history.filter((n) => n.id !== notif.id);
this.emit("history-removed", notif.id); this.emit("history-removed", notif.id);
this.notify("history"); this.notify("history");
}); });