[polari/wip/fmuellner/combined-gsoc: 124/137] userTracker: Don't clear out all room data on disconnect



commit e941fc234ba514d8f7d6a601229c67e6941ca806
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Jul 26 23:10:57 2016 +0200

    userTracker: Don't clear out all room data on disconnect
    
    Disconnecting means tracked users for that room are no longer valid
    and need to be cleared out, but both watch handlers and room signal
    IDs are still valid and we need to keep them.

 src/userTracker.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/userTracker.js b/src/userTracker.js
index 87a5984..2b00308 100644
--- a/src/userTracker.js
+++ b/src/userTracker.js
@@ -127,6 +127,7 @@ const UserTracker = new Lang.Class({
 
         this._disconnectRoomSignalsForRoom(room);
         this._clearUsersFromRoom(room);
+        this._deleteRoomData(room);
     },
 
     _connectRoomSignalsForRoom: function(room) {
@@ -188,7 +189,6 @@ const UserTracker = new Lang.Class({
         let map = this._getRoomContacts(room);
         for ([baseNick, contacts] of map)
             contacts.forEach((m) => { this._untrackMember(m, room); });
-        this._deleteRoomData(room);
     },
 
     _ensureRoomMappingForRoom: function(room) {


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