Sort rooms for prev/next purposes

pull/1/head
David Baker 2015-07-08 19:47:58 +01:00
parent bdfef5eedd
commit 03451d8c7d
1 changed files with 3 additions and 1 deletions

View File

@ -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) {