We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1898e91 commit f219567Copy full SHA for f219567
1 file changed
files/usr/share/cinnamon/applets/[email protected]/applet.js
@@ -243,14 +243,15 @@ class CinnamonNotificationsApplet extends Applet.TextIconApplet {
243
}
244
245
_clear_all() {
246
- let count = this.notifications.length;
247
- if (count > 0) {
248
- for (let i = count-1; i >=0; i--) {
249
- this._notificationbin.remove_actor(this.notifications[i].actor);
250
- this.notifications[i].destroy(NotificationDestroyedReason.DISMISSED);
251
- }
252
+ let toDestroy = this.notifications.slice();
+
+ // Clear tracking state first so destroy handlers skip redundant work.
253
this.notifications = [];
+ this._notificationbin.remove_all_children();
+ for (let notification of toDestroy) {
+ notification.destroy(NotificationDestroyedReason.DISMISSED);
254
+ }
255
this.update_list();
256
257
0 commit comments