From 4da7ce10de46eff134d93d3f2fda7dd1ce639e23 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 19 Mar 2020 23:15:05 +0000 Subject: [PATCH] delint Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/rooms/RoomList.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/views/rooms/RoomList.js b/src/components/views/rooms/RoomList.js index aa4c106bb6..c00f0c920b 100644 --- a/src/components/views/rooms/RoomList.js +++ b/src/components/views/rooms/RoomList.js @@ -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',