diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index fda7f5bec..0d8e884c6 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -834,10 +834,10 @@ var Source = GObject.registerClass({ return; this.notifications.splice(index, 1); + this.countUpdated(); + if (this.notifications.length == 0) this.destroy(); - - this.countUpdated(); } pushNotification(notification) { @@ -891,6 +891,8 @@ var Source = GObject.registerClass({ notifications[i].destroy(reason); this.emit('destroy', reason); + + this.run_dispose(); } iconUpdated() { @@ -905,8 +907,6 @@ var Source = GObject.registerClass({ for (let i = this.notifications.length - 1; i >= 0; i--) if (!this.notifications[i].resident) this.notifications[i].destroy(); - - this.countUpdated(); } });