[polari/wip/fmuellner/combined-gsoc: 134/136] userTracker: Don't prefix roomData properties



commit aedc68e741e13bba4ca6947f0799e0eb83017f24
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Jul 27 00:08:54 2016 +0200

    userTracker: Don't prefix roomData properties
    
    this._roomData.get(room)._contactMapping looks "wrong", namely like
    accessing something else's private property. Prefixing roomData
    itself already makes it clear that other module's don't have any
    business in poking around the property, so we don't need to prefix
    the individual properties anyway ...

 src/userTracker.js |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/userTracker.js b/src/userTracker.js
index 96306ec..902ef1a 100644
--- a/src/userTracker.js
+++ b/src/userTracker.js
@@ -82,15 +82,15 @@ const UserTracker = new Lang.Class({
     },
 
     _getRoomContacts: function(room) {
-        return this._roomData.get(room)._contactMapping;
+        return this._roomData.get(room).contactMapping;
     },
 
     _getRoomHandlers: function(room) {
-        return this._roomData.get(room)._handlerMapping;
+        return this._roomData.get(room).handlerMapping;
     },
 
     _getRoomSignals: function(room) {
-        return this._roomData.get(room)._roomSignals;
+        return this._roomData.get(room).roomSignals;
     },
 
     _onRoomAdded: function(roomManager, room) {
@@ -157,9 +157,9 @@ const UserTracker = new Lang.Class({
     _ensureRoomMappingForRoom: function(room) {
         if (this._roomData.has(room))
             return;
-        this._roomData.set(room, { _contactMapping: new Map(),
-                                   _handlerMapping: new Map(),
-                                   _roomSignals: [] });
+        this._roomData.set(room, { contactMapping: new Map(),
+                                   handlerMapping: new Map(),
+                                   roomSignals: [] });
     },
 
     _onMemberRenamed: function(room, oldMember, newMember) {


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