[polari/wip/fmuellner/combined-gsoc: 106/136] emittingRoom is now renamed to room
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/fmuellner/combined-gsoc: 106/136] emittingRoom is now renamed to room
- Date: Tue, 26 Jul 2016 23:24:53 +0000 (UTC)
commit a16b58c39647da6311a23ec1be411d281f4c0136
Author: raresv <rares visalom gmail com>
Date: Wed Jul 20 18:49:11 2016 +0300
emittingRoom is now renamed to room
src/userTracker.js | 22 +++++++++-------------
1 files changed, 9 insertions(+), 13 deletions(-)
---
diff --git a/src/userTracker.js b/src/userTracker.js
index 138bdbe..39cea0c 100644
--- a/src/userTracker.js
+++ b/src/userTracker.js
@@ -142,11 +142,7 @@ const UserTracker = new Lang.Class({
roomData._roomSignals = [];
},
- /* personally I find over-specific variable names like "emittingRoom"
- * more distracting than helpful - "oh, it's not just called 'room',
- * what is special about it?". Calling it roomThatEmittedNotifyChannelSignal
- * would clarify that, but meh ... */
- _onChannelChanged: function(emittingRoom) {
+ _onChannelChanged: function(room) {
/* You can save one level of indentation by doing:
if (!room.channel) {
@@ -155,21 +151,21 @@ const UserTracker = new Lang.Class({
}
*/
- if (emittingRoom.channel) {
+ if (room.channel) {
let members;
- if (emittingRoom.type == Tp.HandleType.ROOM)
- members = emittingRoom.channel.group_dup_members_contacts();
+ if (room.type == Tp.HandleType.ROOM)
+ members = room.channel.group_dup_members_contacts();
else
- members = [emittingRoom.channel.connection.self_contact,
emittingRoom.channel.target_contact];
+ members = [room.channel.connection.self_contact, room.channel.target_contact];
/*TODO: is this needed here?*/
- this._ensureRoomMappingForRoom(emittingRoom);
+ this._ensureRoomMappingForRoom(room);
- /*keep track of initial members in the emittingRoom, both locally and
+ /*keep track of initial members in the room, both locally and
globally*/
- members.forEach(m => { this._trackMember(m, emittingRoom); });
+ members.forEach(m => { this._trackMember(m, room); });
} else {
- this._clearUsersFromRoom(emittingRoom);
+ this._clearUsersFromRoom(room);
}
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]