From 7609b9eba8b6711ce806d7eea3693de3d8db86ae Mon Sep 17 00:00:00 2001 From: theworldbright Date: Wed, 29 Jun 2016 17:45:24 +0900 Subject: [PATCH] Simplify logic for timestamp ordering of memberlist --- src/components/views/rooms/MemberList.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/views/rooms/MemberList.js b/src/components/views/rooms/MemberList.js index 28e6b97942..20f60c80a8 100644 --- a/src/components/views/rooms/MemberList.js +++ b/src/components/views/rooms/MemberList.js @@ -425,9 +425,7 @@ module.exports = React.createClass({ // 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 - var lastActiveTsA = userA && userA.lastActiveAgo ? userA.lastActiveAgo : 9999999999; - var lastActiveTsB = userB && userB.lastActiveAgo ? userB.lastActiveAgo : 9999999999; - return lastActiveTsA - lastActiveTsB; + return userB.getLastActiveTs() - userA.getLastActiveTs(); }, onSearchQueryChanged: function(input) {