[polari] chatView: Minor cleanup



commit e7484df2ae80e2aea7d202885371be000f04151d
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat Jul 9 03:55:10 2016 +0200

    chatView: Minor cleanup
    
    Once upon a time, _insertTpMessage() was a handler for the
    ::message-send/::message-received signals. This hasn't been
    the case for a while now, so we can drop the first parameter
    that used to be the signal source - it's unusable anyway, as
    we are passing in objects of different type, whoops.

 src/chatView.js |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/chatView.js b/src/chatView.js
index 4c70be0..e144658 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -866,7 +866,7 @@ const ChatView = new Lang.Class({
 
         this._channel.dup_pending_messages().forEach(Lang.bind(this,
             function(message) {
-                this._insertTpMessage(this._room, message);
+                this._insertTpMessage(message);
             }));
         this._checkMessages();
     },
@@ -920,8 +920,8 @@ const ChatView = new Lang.Class({
         this._untrackContact(member);
     },
 
-    _onMessageReceived: function(room, tpMessage) {
-        this._insertTpMessage(room, tpMessage);
+    _onMessageReceived: function(channel, tpMessage) {
+        this._insertTpMessage(tpMessage);
         this._resetStatusCompressed();
         let nick = tpMessage.sender.alias;
         let nickTag = this._lookupTag('nick' + nick);
@@ -930,8 +930,8 @@ const ChatView = new Lang.Class({
         nickTag._lastActivity = GLib.get_monotonic_time();
     },
 
-    _onMessageSent: function(room, tpMessage) {
-        this._insertTpMessage(room, tpMessage);
+    _onMessageSent: function(channel, tpMessage) {
+        this._insertTpMessage(tpMessage);
         this._resetStatusCompressed();
     },
 
@@ -1133,7 +1133,7 @@ const ChatView = new Lang.Class({
         return date.format(format);
     },
 
-    _insertTpMessage: function(room, tpMessage) {
+    _insertTpMessage: function(tpMessage) {
         let [text, flags] = tpMessage.to_text();
 
         let message = { nick: tpMessage.sender.alias,


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