[polari/wip/fmuellner/combined-gsoc: 108/137] renamed (un)watchUser() to (un)watchRoomStatus()
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/fmuellner/combined-gsoc: 108/137] renamed (un)watchUser() to (un)watchRoomStatus()
- Date: Thu, 28 Jul 2016 16:24:31 +0000 (UTC)
commit 1dd5131955c9177ffed1f4113df7c09e0ef15b77
Author: raresv <rares visalom gmail com>
Date: Wed Jul 20 19:01:52 2016 +0300
renamed (un)watchUser() to (un)watchRoomStatus()
src/chatView.js | 4 ++--
src/userList.js | 6 +++---
src/userTracker.js | 9 ++-------
3 files changed, 7 insertions(+), 12 deletions(-)
---
diff --git a/src/chatView.js b/src/chatView.js
index b168927..c3470f6 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -348,11 +348,11 @@ const ChatView = new Lang.Class({
this._onChannelChanged();
this._nickStatusChangedId =
- this._userTracker.watchUser(this._room, null,
+ this._userTracker.watchRoomStatus(this._room, null,
Lang.bind(this, this._onNickStatusChanged));
this.connect('destroy', () => {
- this._userTracker.unwatchUser(this._room, this._nickStatusChangedId);
+ this._userTracker.unwatchRoomStatus(this._room, this._nickStatusChangedId);
this._userTracker = null;
});
},
diff --git a/src/userList.js b/src/userList.js
index 649f865..dd60742 100644
--- a/src/userList.js
+++ b/src/userList.js
@@ -399,13 +399,13 @@ const UserPopover = new Lang.Class({
* - Convention is to use 'id', not 'signal'
* - maybe this._roomStatusChangedId is clearer? */
if (this._localStatusChangedSignal)
- this._userTracker.unwatchUser(this._room, this._localStatusChangedSignal);
+ this._userTracker.unwatchRoomStatus(this._room, this._localStatusChangedSignal);
/* this desparately needs line breaks, sth like
this._localStatusChangedId =
- this._userTracker.watchUser(this._room, this._nickname,
+ this._userTracker.watchRoomStatus(this._room, this._nickname,
Lang.bind(this, this._onNickStatusChanged));
*/
- this._localStatusChangedSignal = this._userTracker.watchUser(this._room, this._nickname,
Lang.bind(this, this._onNickStatusChanged));
+ this._localStatusChangedSignal = this._userTracker.watchRoomStatus(this._room, this._nickname,
Lang.bind(this, this._onNickStatusChanged));
/* Dto. */
if (this._globalStatusChangedSignal)
diff --git a/src/userTracker.js b/src/userTracker.js
index cab514a..5ac483d 100644
--- a/src/userTracker.js
+++ b/src/userTracker.js
@@ -294,12 +294,7 @@ const UserTracker = new Lang.Class({
return contacts[0];
},
- /* Not sure about that name, it sounds a bit googley/big brother;
- * maybe watchUserStatus()? But then, the user is optional and the
- * room is not afaics, so maybe use watchRoomStatus() instead?
- * (Side note: If a method is called watchUser(), I'd expect the
- * user parameter to be the first one) */
- watchUser: function(room, nick, callback) {
+ watchRoomStatus: function(room, nick, callback) {
this._ensureRoomMappingForRoom(room);
this._roomMapping.get(room)._handlerMapping.set(this._handlerCounter, {
@@ -318,7 +313,7 @@ const UserTracker = new Lang.Class({
return this._handlerCounter - 1;
},
- unwatchUser: function(room, handlerID) {
+ unwatchRoomStatus: function(room, handlerID) {
/*TODO: rewrite into a single conditional?*/
if (!this._roomMapping)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]