Fix off by 1 in previousRoom condition

This commit is contained in:
Nicolas Werner 2021-06-18 14:13:01 +02:00
parent e6edb1daa3
commit c69d2ef648
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
1 changed files with 1 additions and 1 deletions

View File

@ -662,7 +662,7 @@ FilteredRoomlistModel::previousRoom()
if (r) {
int idx = roomidToIndex(r->roomId());
idx--;
if (idx > 0) {
if (idx >= 0) {
setCurrentRoom(
data(index(idx, 0), RoomlistModel::Roles::RoomId).toString());
}