You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
rename to mostRecentActivityFirst to disambiguate from sorting by when you joined a room, which this is not.
This commit is contained in:
@@ -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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user