Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
Michael Telatynski 2020-03-19 23:15:05 +00:00
parent f5d490ee78
commit 4da7ce10de
1 changed files with 3 additions and 5 deletions

View File

@ -269,12 +269,11 @@ export default createReactClass({
...favouriteRooms,
...dmRooms,
...recentRooms,
// eslint-disable-next-line prefer-spread
...[].concat.apply([], shownCustomTagRooms),
...[].concat.apply([], shownCustomTagRooms), // eslint-disable-line prefer-spread
...lowPriorityRooms,
...historicalRooms,
...serverNoticeRooms,
], this.props.searchFilter); // TODO optimize
], this.props.searchFilter);
if (payload.unread) {
// filter to only notification rooms (and our current active room so we can index properly)
@ -284,9 +283,8 @@ export default createReactClass({
}
const currentIndex = rooms.findIndex(room => room.roomId === currentRoomId);
// use slice to account for looping around the start
const [room] = rooms.slice((currentIndex + payload.delta) % rooms.length);
// console.log("DEBUG", currentIndex, room, rooms);
if (room) {
dis.dispatch({
action: 'view_room',