[polari/wip/raresv/popoverRebasedOnTracker] fix typo and rename the map



commit 0a8daaed72ea41ce69ef0c2a916685ced6376765
Author: raresv <rares visalom gmail com>
Date:   Wed Jul 20 17:36:55 2016 +0300

    fix typo and rename the map

 src/userTracker.js |   16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)
---
diff --git a/src/userTracker.js b/src/userTracker.js
index 34fc461..b427ffb 100644
--- a/src/userTracker.js
+++ b/src/userTracker.js
@@ -22,9 +22,7 @@ const UserStatusMonitor = new Lang.Class({
     Name: 'UserStatusMonitor',
 
     _init: function() {
-        /* Typo: maping
-         * Though I'd just call it this._userTrackers */
-        this._userTrackersMaping = new Map();
+        this._userTrackers = new Map();
         this._accountsMonitor = AccountsMonitor.getDefault();
 
         this._accountsMonitor.connect('account-added', Lang.bind(this, this._onAccountAdded));
@@ -32,22 +30,22 @@ const UserStatusMonitor = new Lang.Class({
     },
 
     _onAccountAdded: function(accountsMonitor, account) {
-        if (this._userTrackersMaping.has(account))
+        if (this._userTrackers.has(account))
             return;
 
-        this._userTrackersMaping.set(account, new UserTracker(account));
+        this._userTrackers.set(account, new UserTracker(account));
     },
 
     _onAccountRemoved: function(accountsMonitor, account) {
-        if (!this._userTrackersMaping.has(account))
+        if (!this._userTrackers.has(account))
             return;
 
-        this._userTrackersMaping.delete(account);
+        this._userTrackers.delete(account);
     },
 
     getUserTrackerForAccount: function(account) {
-        if (this._userTrackersMaping.has(account))
-            return this._userTrackersMaping.get(account);
+        if (this._userTrackers.has(account))
+            return this._userTrackers.get(account);
         return null;
     }
 });


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