[polari/wip/fmuellner/combined-gsoc: 129/136] userTracker: Minor cleanup



commit 1d5a645846451ff62193fcd1a6265c1ec7193693
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Jul 26 23:33:12 2016 +0200

    userTracker: Minor cleanup
    
    When a room is removed, rather than duplicating the condition for
    whether the room is tracked, we can just check whether we have
    room data for it - everything the function does will be useless
    anyway if we don't have any data to operate on ...

 src/userTracker.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/userTracker.js b/src/userTracker.js
index 412adac..85703be 100644
--- a/src/userTracker.js
+++ b/src/userTracker.js
@@ -117,7 +117,7 @@ const UserTracker = new Lang.Class({
     },
 
     _onRoomRemoved: function(roomManager, room) {
-        if (room.account != this._account)
+        if (!this._roomData.has(room))
             return;
 
         this._getRoomSignals(room).forEach(id => { room.disconnect(id); });


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