[gnome-shell/wip/fmuellner/more-notification-warnings: 2/2] messageTray: Disconnect signals when resetting notification



commit 8f732e4f452a3a8df6b590a5577e2896d4e2e6cf
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Jan 29 15:30:40 2019 +0100

    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) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]