Improve ordering of memberlist by absolutizing lastActive correctly

Change ordering of memberlist to not try to compare lastActive of 'currentlyActive' users, as lastActive may will be a complete lie as it only gets updated when currentlyActive transitions to false (i think?)
Remove order by online/idle/offline in favour of "currently active, ordered by power and then alphabetic name, followed by last active, followed by offline"
Add commented-out code to track last-spoken-within-a-room ordering.
Fix kludges due to SYJS-28 (depends on JS PR landing)
This commit is contained in:
Matthew Hodgson 2016-04-18 01:35:40 +01:00
parent eeb9abdf81
commit b949e78683
4 changed files with 135 additions and 52 deletions

View file

@ -76,6 +76,8 @@ module.exports = React.createClass({
render: function() {
if (this.props.activeAgo >= 0) {
var ago = this.props.currentlyActive ? "now" : (this.getDuration(this.props.activeAgo) + " ago");
// var ago = this.getDuration(this.props.activeAgo) + " ago";
// if (this.props.currentlyActive) ago += " (now?)";
return (
<div className="mx_PresenceLabel">
{ this.getPrettyPresence(this.props.presenceState) } { ago }