[polari/wip/raresv/userTrackerAndPopoversRebase: 7/24] userDetails: add _traceFallbackNick() method that should be used to update the last activity time wh



commit 936ca97d2c180766d3edb68088bf843b83a8e71b
Author: raresv <rares visalom gmail com>
Date:   Wed Aug 3 18:38:29 2016 +0300

    userDetails: add _traceFallbackNick() method that should be used to update the last activity time when in 
the offline case.

 src/userList.js |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/userList.js b/src/userList.js
index 5b3e876..8595c0f 100644
--- a/src/userList.js
+++ b/src/userList.js
@@ -195,6 +195,8 @@ const UserDetails = new Lang.Class({
             this._user.request_contact_info_async(this._cancellable,
                                               Lang.bind(this, this._onContactInfoReady));
         //TODO: else use this._falbackNick to query tracker
+        else
+            this._trackFallbackNick(this._fallbackNick);
     },
 
     _unexpand: function() {
@@ -265,6 +267,15 @@ const UserDetails = new Lang.Class({
         this._revealDetails();
     },
 
+    _trackFallbackNick: function(fallbackNick) {
+        this._lastHeader.label = '<small>' + _("Last Activity:") + '</small>';
+        this._lastHeader.show();
+
+        this._userIcon.visible = false;
+
+        this._revealDetails();
+    },
+
     _revealDetails: function() {
         this._spinner.stop();
         this._spinnerBox.hide();


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