Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions files/usr/share/cinnamon/applets/[email protected]/applet.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,14 +243,15 @@ class CinnamonNotificationsApplet extends Applet.TextIconApplet {
}

_clear_all() {
let count = this.notifications.length;
if (count > 0) {
for (let i = count-1; i >=0; i--) {
this._notificationbin.remove_actor(this.notifications[i].actor);
this.notifications[i].destroy(NotificationDestroyedReason.DISMISSED);
}
}
let toDestroy = this.notifications.slice();

// Clear tracking state first so destroy handlers skip redundant work.
this.notifications = [];
this._notificationbin.remove_all_children();

for (let notification of toDestroy) {
notification.destroy(NotificationDestroyedReason.DISMISSED);
}
this.update_list();
}

Expand Down
Loading