[polari/wip/fmuellner/combined-gsoc: 112/137] status handlers consistency
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/fmuellner/combined-gsoc: 112/137] status handlers consistency
- Date: Thu, 28 Jul 2016 16:24:51 +0000 (UTC)
commit 9e19c11bed21944251f6370f5e8c95d5ea26f1fd
Author: raresv <rares visalom gmail com>
Date: Thu Jul 21 15:43:09 2016 +0300
status handlers consistency
src/chatView.js | 4 ++--
src/userList.js | 2 +-
src/userTracker.js | 8 ++++----
3 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/chatView.js b/src/chatView.js
index c3470f6..fcc7d15 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -1253,8 +1253,8 @@ const ChatView = new Lang.Class({
this._view.buffer.create_mark(null, iter, true));
},
- _onNickStatusChanged: function(nick, status) {
- let nickTagName = this._getNickTagName(nick);
+ _onNickStatusChanged: function(baseNick, status) {
+ let nickTagName = this._getNickTagName(baseNick);
let nickTag = this._lookupTag(nickTagName);
if (!nickTag)
diff --git a/src/userList.js b/src/userList.js
index af9634e..a1d2937 100644
--- a/src/userList.js
+++ b/src/userList.js
@@ -483,7 +483,7 @@ const UserPopover = new Lang.Class({
this._userDetails.nickname = this._nickname;
},
- _onNickStatusChanged: function(nickName, status) {
+ _onNickStatusChanged: function(baseNick, status) {
this._updateContents();
}
});
diff --git a/src/userTracker.js b/src/userTracker.js
index 17affad..d2cd442 100644
--- a/src/userTracker.js
+++ b/src/userTracker.js
@@ -191,7 +191,7 @@ const UserTracker = new Lang.Class({
let baseNick = Polari.util_get_basenick(member.alias);
for ([id, info] of this._roomMapping.get(room)._handlerMapping)
if (!info.nickName || info.nickName == baseNick)
- info.handler(member.alias, status);
+ info.handler(baseNick, status);
},
_pushMember: function(map, baseNick, member) {
@@ -207,7 +207,7 @@ const UserTracker = new Lang.Class({
let map = this._baseNickContacts;
if (this._pushMember(map, baseNick, member) == 1) {
- this.emit("status-changed::" + baseNick, member.alias, status);
+ this.emit("status-changed::" + baseNick, baseNick, status);
let notifyAction = this._app.lookup_action(this._getNotifyActionName(member.alias));
@@ -289,11 +289,11 @@ const UserTracker = new Lang.Class({
return contacts[0];
},
- watchRoomStatus: function(room, nick, callback) {
+ watchRoomStatus: function(room, baseNick, callback) {
this._ensureRoomMappingForRoom(room);
this._roomMapping.get(room)._handlerMapping.set(++this._handlerCounter, {
- nickName: nick ? Polari.util_get_basenick(nick) : undefined,
+ nickName: baseNick,
handler: callback
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]