rename to mostRecentActivityFirst to disambiguate from sorting by when you joined a room, which this is not.
This commit is contained in:
parent
d58fdef362
commit
c14886a1ee
3 changed files with 4 additions and 4 deletions
|
@ -20,12 +20,12 @@ function tsOfNewestEvent(room) {
|
|||
return room.timeline[room.timeline.length - 1].getTs();
|
||||
}
|
||||
|
||||
function mostRecentFirst(roomList) {
|
||||
function mostRecentActivityFirst(roomList) {
|
||||
return roomList.sort(function(a,b) {
|
||||
return tsOfNewestEvent(b) - tsOfNewestEvent(a);
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
mostRecentFirst: mostRecentFirst
|
||||
mostRecentActivityFirst: mostRecentActivityFirst
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue