[polari/wip/raresv/popoverRebasedOnTracker] userTracker: Minor cleanup



commit 8a97e9d6c276fda9ad1d21b5e8797c7779cf6b2e
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]