[polari/wip/raresv/popoverRebasedOnTracker] userTracker: Don't prefix roomData properties



commit b2593ef7fb8abce394cb634aba3974c596402d99
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]