fix display of null last_active_ago timestamps
This commit is contained in:
parent
87e1bc2f07
commit
2265d1a82a
2 changed files with 4 additions and 6 deletions
|
@ -84,9 +84,8 @@ module.exports = React.createClass({
|
|||
this.user_last_modified_time = member.user.getLastModifiedTime();
|
||||
|
||||
// FIXME: make presence data update whenever User.presence changes...
|
||||
active = (
|
||||
(Date.now() - (member.user.lastPresenceTs - member.user.lastActiveAgo)) || -1
|
||||
);
|
||||
active = member.user.lastActiveAgo ?
|
||||
(Date.now() - (member.user.lastPresenceTs - member.user.lastActiveAgo)) : -1;
|
||||
}
|
||||
this.member_last_modified_time = member.getLastModifiedTime();
|
||||
|
||||
|
|
|
@ -38,9 +38,8 @@ module.exports = React.createClass({
|
|||
var active = -1;
|
||||
|
||||
// FIXME: make presence data update whenever User.presence changes...
|
||||
active = (
|
||||
(Date.now() - (user.lastPresenceTs - user.lastActiveAgo)) || -1
|
||||
);
|
||||
active = member.user.lastActiveAgo ?
|
||||
(Date.now() - (member.user.lastPresenceTs - member.user.lastActiveAgo)) : -1;
|
||||
|
||||
var BaseAvatar = sdk.getComponent('avatars.BaseAvatar');
|
||||
var avatarJsx = (
|
||||
|
|
Loading…
Reference in a new issue