From 1a69ae684eefc04f3ab2b9fc60a980dde274fff6 Mon Sep 17 00:00:00 2001 From: miruka Date: Tue, 5 May 2020 21:24:54 -0400 Subject: [PATCH] Fix focusRoomAtIndex binds --- src/gui/MainPane/RoomList.qml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/gui/MainPane/RoomList.qml b/src/gui/MainPane/RoomList.qml index 70f3b1d7..7733a6ba 100644 --- a/src/gui/MainPane/RoomList.qml +++ b/src/gui/MainPane/RoomList.qml @@ -76,15 +76,11 @@ HListView { } function showAccountRoomAtIndex(index) { - const userId = model.filtered.get( + const currentUserId = model.filtered.get( currentIndex === -1 ? 0 : currentIndex ).model.for_account - const rooms = ModelStore.get(userId, "rooms") - if (! rooms.count) return - - const room = rooms.get(utils.numberWrapAt(index, rooms.count)) - showRoomAtIndex(model.filteredFindIndex(room.id)) + showRoomAtIndex(sectionIndice[currentUserId] + index) }