From 500b88dc36c1c0373eedcd792bc0c6d22a95350a Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Wed, 16 Mar 2016 22:44:54 +0000 Subject: [PATCH] implement currently_active --- src/components/views/rooms/EntityTile.js | 1 + src/components/views/rooms/MemberTile.js | 1 + src/components/views/rooms/PresenceLabel.js | 3 ++- src/components/views/rooms/UserTile.js | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/views/rooms/EntityTile.js b/src/components/views/rooms/EntityTile.js index ec586431be..61ad43e9c4 100644 --- a/src/components/views/rooms/EntityTile.js +++ b/src/components/views/rooms/EntityTile.js @@ -88,6 +88,7 @@ module.exports = React.createClass({
{ this.props.name }
); diff --git a/src/components/views/rooms/MemberTile.js b/src/components/views/rooms/MemberTile.js index 89f4e35805..57cb7232d4 100644 --- a/src/components/views/rooms/MemberTile.js +++ b/src/components/views/rooms/MemberTile.js @@ -91,6 +91,7 @@ module.exports = React.createClass({ return ( diff --git a/src/components/views/rooms/PresenceLabel.js b/src/components/views/rooms/PresenceLabel.js index 4ecad5b3df..f3315de80c 100644 --- a/src/components/views/rooms/PresenceLabel.js +++ b/src/components/views/rooms/PresenceLabel.js @@ -67,9 +67,10 @@ module.exports = React.createClass({ render: function() { if (this.props.activeAgo >= 0) { + var ago = this.props.currentlyActive ? "now" : (this.getDuration(this.props.activeAgo) + " ago"); return (
- { this.getPrettyPresence(this.props.presenceState) } { this.getDuration(this.props.activeAgo) } ago + { this.getPrettyPresence(this.props.presenceState) } { ago }
); } diff --git a/src/components/views/rooms/UserTile.js b/src/components/views/rooms/UserTile.js index 26b9df7e38..fe7e95a02a 100644 --- a/src/components/views/rooms/UserTile.js +++ b/src/components/views/rooms/UserTile.js @@ -49,6 +49,7 @@ module.exports = React.createClass({ return ( ); }