From c4bc9616af9df96bafe454e6f52bfc281bca4c95 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Fri, 2 Aug 2013 00:09:33 -0400 Subject: [PATCH] messageTray: Remove code that happens on notification destruction --- js/ui/messageTray.js | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 5ae077161..4fae78978 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -1950,26 +1950,11 @@ const MessageTray = new Lang.Class({ source.disconnect(obj.destroyId); source.disconnect(obj.mutedChangedId); - let needUpdate = false; - - if (this._notification && this._notification.source == source) { - this._updateNotificationTimeout(0); - this._notificationRemoved = true; - needUpdate = true; - } - if (this._clickedSummaryItem == summaryItem) { - this._setClickedSummaryItem(null); - needUpdate = true; - } - summaryItem.destroy(); this.emit('source-removed', source); this._updateNoMessagesLabel(); - - if (needUpdate) - this._updateState(); }, getSources: function() { @@ -2689,6 +2674,10 @@ const MessageTray = new Lang.Class({ if (this._clickedSummaryItem) { this._clickedSummaryItem.actor.add_style_pseudo_class('selected'); + this._clickedSummaryItem.actor.connect('destroy', Lang.bind(this, function() { + this._setClickedSummaryItem(null); + this._updateState(); + })); this._clickedSummaryItemAllocationChangedId = this._clickedSummaryItem.actor.connect('allocation-changed', Lang.bind(this, this._adjustSummaryBoxPointerPosition));