diff --git a/src/controllers/pages/MatrixChat.js b/src/controllers/pages/MatrixChat.js index fe126e50..717f91e7 100644 --- a/src/controllers/pages/MatrixChat.js +++ b/src/controllers/pages/MatrixChat.js @@ -80,7 +80,9 @@ module.exports = { case 'view_prev_room': roomIndexDelta = -1; case 'view_next_room': - var allRooms = MatrixClientPeg.get().getRooms(); + var allRooms = RoomListSorter.mostRecentActivityFirst( + MatrixClientPeg.get().getRooms() + ); var roomIndex = -1; for (var i = 0; i < allRooms.length; ++i) { if (allRooms[i].roomId == this.state.currentRoom) {