Skip to content

Commit c14886a

Browse files
committed
rename to mostRecentActivityFirst to disambiguate from sorting by when you joined a room, which this is not.
1 parent d58fdef commit c14886a

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎src/RoomListSorter.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ function tsOfNewestEvent(room) {
2020
return room.timeline[room.timeline.length - 1].getTs();
2121
}
2222

23-
function mostRecentFirst(roomList) {
23+
function mostRecentActivityFirst(roomList) {
2424
return roomList.sort(function(a,b) {
2525
return tsOfNewestEvent(b) - tsOfNewestEvent(a);
2626
});
2727
}
2828

2929
module.exports = {
30-
mostRecentFirst: mostRecentFirst
30+
mostRecentActivityFirst: mostRecentActivityFirst
3131
};

‎src/controllers/organisms/RoomList.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ module.exports = {
9696
},
9797

9898
getRoomList() {
99-
return RoomListSorter.mostRecentFirst(MatrixClientPeg.get().getRooms());
99+
return RoomListSorter.mostRecentActivityFirst(MatrixClientPeg.get().getRooms());
100100
},
101101

102102
makeRoomTiles: function() {

‎src/controllers/pages/MatrixChat.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ module.exports = {
107107
cli.on('syncComplete', function() {
108108
var firstRoom = null;
109109
if (cli.getRooms() && cli.getRooms().length) {
110-
firstRoom = RoomListSorter.mostRecentFirst(
110+
firstRoom = RoomListSorter.mostRecentActivityFirst(
111111
cli.getRooms()
112112
)[0].roomId;
113113
}

0 commit comments

Comments
 (0)