[gnome-shell/gnome-3-28] messageList: stop syncing if closeButton has been destroyed



commit 6baf82eb83b5f400a998f82921a3c0511340d96e
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Wed Jul 4 13:56:25 2018 +0000

    messageList: stop syncing if closeButton has been destroyed
    
    The _sync function for Message only updates the close button visibility,
    so we can safely stop doing that if the close button get get destroyed earlier
    (as it happens when clicking on it).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=791233
    
    
    (cherry picked from commit 87da623d86323a0744b8723e1991f053586defaf)

 js/ui/messageList.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/messageList.js b/js/ui/messageList.js
index aff201ed6..2d397c1d7 100644
--- a/js/ui/messageList.js
+++ b/js/ui/messageList.js
@@ -362,7 +362,8 @@ var Message = new Lang.Class({
         this.setBody(body);
 
         this._closeButton.connect('clicked', this.close.bind(this));
-        this.actor.connect('notify::hover', this._sync.bind(this));
+        let actorHoverId = this.actor.connect('notify::hover', this._sync.bind(this));
+        this._closeButton.connect('destroy', this.actor.disconnect.bind(this.actor, actorHoverId));
         this.actor.connect('clicked', this._onClicked.bind(this));
         this.actor.connect('destroy', this._onDestroy.bind(this));
         this._sync();


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