[polari] chatView: Update join time on channel changes



commit 495d62ec39b3e3fdd4f3df70da6388e139820160
Author: Florian Müllner <fmuellner gnome org>
Date:   Sun Sep 21 02:17:13 2014 +0200

    chatView: Update join time on channel changes
    
    The code introduced in commit d2bbe17a76578e to prevent status
    messages flooding the chat log when connecting broke when we
    decoupled rooms and channels - rather than setting the join time
    once on room creation, we need to update it every time we get
    a connection established (i.e. a channel).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=736349

 src/chatView.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/chatView.js b/src/chatView.js
index 89334d5..4758ed6 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -94,7 +94,7 @@ const ChatView = new Lang.Class({
         this._state = { lastNick: null, lastTimestamp: 0 };
         this._active = false;
         this._toplevelFocus = false;
-        this._joinTime = GLib.DateTime.new_now_utc().to_unix();
+        this._joinTime = 0;
         this._maxNickChars = MAX_NICK_CHARS;
         this._hoveringLink = false;
         this._needsIndicator = true;
@@ -518,6 +518,7 @@ const ChatView = new Lang.Class({
         if (!this._channel)
             return;
 
+        this._joinTime = GLib.DateTime.new_now_utc().to_unix();
 
         let channelSignals = [
             { name: 'message-received',


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