Skip to content
Snippets Groups Projects
Verified Commit c69d2ef6 authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Fix off by 1 in previousRoom condition

parent e6edb1da
No related branches found
No related tags found
No related merge requests found
...@@ -662,7 +662,7 @@ FilteredRoomlistModel::previousRoom() ...@@ -662,7 +662,7 @@ FilteredRoomlistModel::previousRoom()
if (r) { if (r) {
int idx = roomidToIndex(r->roomId()); int idx = roomidToIndex(r->roomId());
idx--; idx--;
if (idx > 0) { if (idx >= 0) {
setCurrentRoom( setCurrentRoom(
data(index(idx, 0), RoomlistModel::Roles::RoomId).toString()); data(index(idx, 0), RoomlistModel::Roles::RoomId).toString());
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment