From 8f732e4f452a3a8df6b590a5577e2896d4e2e6cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 29 Jan 2019 15:30:40 +0100 Subject: [PATCH] messageTray: Disconnect signals when resetting notification Just like we did for the parent class in commit b57832716a, we should disconnect any notification signals when the notification is reset to null to avoid warnings later. https://gitlab.gnome.org/GNOME/gnome-shell/issues/942 --- js/ui/messageTray.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 0fd739834..97452275f 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -497,9 +497,12 @@ class NotificationBanner extends Calendar.NotificationMessage { }); } - _onDestroy() { - super._onDestroy(); - this.notification.disconnect(this._activatedId); + _disconnectNotificationSignals() { + super._disconnectNotificationSignals(); + + if (this._activatedId) + this.notification.disconnect(this._activatedId); + this._activatedId = 0; } _onUpdated(n, clear) {