diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-06-18 14:13:01 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-06-25 11:34:19 +0200 |
commit | c69d2ef64886ee4946abf4b959d53b884014ce7a (patch) | |
tree | e99b5d7883abf095ccd3336fae43f656a06ff864 | |
parent | Hide last message on spaces (diff) | |
download | nheko-c69d2ef64886ee4946abf4b959d53b884014ce7a.tar.xz |
Fix off by 1 in previousRoom condition
-rw-r--r-- | src/timeline/RoomlistModel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/timeline/RoomlistModel.cpp b/src/timeline/RoomlistModel.cpp index e4014333..a44959fc 100644 --- a/src/timeline/RoomlistModel.cpp +++ b/src/timeline/RoomlistModel.cpp @@ -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()); } |