diff --git a/js/ui/calendar.js b/js/ui/calendar.js index b571e4c6b..36f8d36f9 100644 --- a/js/ui/calendar.js +++ b/js/ui/calendar.js @@ -1229,7 +1229,7 @@ const NotificationMessage = new Lang.Class({ this._closed = true; this.notification.destroy(MessageTray.NotificationDestroyedReason.DISMISSED); })); - notification.connect('destroy', Lang.bind(this, + this._destroyId = notification.connect('destroy', Lang.bind(this, function() { if (!this._closed) this.close(); @@ -1260,6 +1260,10 @@ const NotificationMessage = new Lang.Class({ if (this._updatedId) this.notification.disconnect(this._updatedId); this._updatedId = 0; + + if (this._destroyId) + this.notification.disconnect(this._destroyId); + this._destroyId = 0; } });