Switch ordering of Idle users

This commit is contained in:
theworldbright 2016-06-29 17:08:17 +09:00
parent 72a1d5a0de
commit 69cb0a8f1c

View file

@ -423,9 +423,9 @@ module.exports = React.createClass({
if (userA.currentlyActive && !userB.currentlyActive) return -1; if (userA.currentlyActive && !userB.currentlyActive) return -1;
if (!userA.currentlyActive && userB.currentlyActive) return 1; if (!userA.currentlyActive && userB.currentlyActive) return 1;
var lastActiveTsA = userA && userA.lastActiveAgo ? userA.lastActiveAgo : 0; var lastActiveTsA = userA && userA.lastActiveAgo ? userA.lastActiveAgo : 9999999999;
var lastActiveTsB = userB && userB.lastActiveAgo ? userB.lastActiveAgo : 0; var lastActiveTsB = userB && userB.lastActiveAgo ? userB.lastActiveAgo : 9999999999;
return lastActiveTsB - lastActiveTsA; return lastActiveTsA - lastActiveTsB;
}, },
onSearchQueryChanged: function(input) { onSearchQueryChanged: function(input) {