mirror of https://github.com/vector-im/riot-web
Merge pull request #327 from theworldbright/1492-fix-ordering-memberlist
Fix ordering of Memberlistpull/21833/head
commit
ce39822957
|
@ -425,27 +425,7 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
// For now, let's just order things by timestamp. It's really annoying
|
// For now, let's just order things by timestamp. It's really annoying
|
||||||
// that a user disappears from sight just because they temporarily go offline
|
// that a user disappears from sight just because they temporarily go offline
|
||||||
/*
|
return userB.getLastActiveTs() - userA.getLastActiveTs();
|
||||||
var presenceMap = {
|
|
||||||
online: 3,
|
|
||||||
unavailable: 2,
|
|
||||||
offline: 1
|
|
||||||
};
|
|
||||||
|
|
||||||
var presenceOrdA = userA ? presenceMap[userA.presence] : 0;
|
|
||||||
var presenceOrdB = userB ? presenceMap[userB.presence] : 0;
|
|
||||||
|
|
||||||
if (presenceOrdA != presenceOrdB) {
|
|
||||||
return presenceOrdB - presenceOrdA;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
var lastActiveTsA = userA && userA.lastActiveTs ? userA.lastActiveTs : 0;
|
|
||||||
var lastActiveTsB = userB && userB.lastActiveTs ? userB.lastActiveTs : 0;
|
|
||||||
|
|
||||||
// console.log("comparing ts: " + lastActiveTsA + " and " + lastActiveTsB);
|
|
||||||
|
|
||||||
return lastActiveTsB - lastActiveTsA;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onSearchQueryChanged: function(input) {
|
onSearchQueryChanged: function(input) {
|
||||||
|
|
Loading…
Reference in New Issue