diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 65ab89be1..9dfb54cec 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -1407,10 +1407,8 @@ const Source = new Lang.Class({ }, pushNotification: function(notification) { - if (this.notifications.indexOf(notification) < 0) { - this.notifications.push(notification); - this.emit('notification-added', notification); - } + if (this.notifications.indexOf(notification) >= 0) + return; notification.connect('clicked', Lang.bind(this, this.open)); notification.connect('destroy', Lang.bind(this, @@ -1426,6 +1424,9 @@ const Source = new Lang.Class({ this.countUpdated(); })); + this.notifications.push(notification); + this.emit('notification-added', notification); + this.countUpdated(); },