RoomListPage: Fix skipping invisible items in goToNextRoom()

We don't want to skip over invisible items if they are one element after
the end of the ListView, but if they aren't the last item.
This commit is contained in:
Kevin Wolf
2023-02-20 19:09:44 +01:00
committed by Tobias Fella
parent 51a29ac528
commit 3b2dbc731e

View File

@@ -134,7 +134,7 @@ Kirigami.ScrollablePage {
function goToNextRoom() {
do {
listView.incrementCurrentIndex();
} while (!listView.currentItem.visible && listView.currentIndex === listView.count)
} while (!listView.currentItem.visible && listView.currentIndex !== listView.count - 1)
listView.currentItem.action.trigger();
}