summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-06-18 14:13:01 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2021-06-25 11:34:19 +0200
commitc69d2ef64886ee4946abf4b959d53b884014ce7a (patch)
treee99b5d7883abf095ccd3336fae43f656a06ff864
parentHide last message on spaces (diff)
downloadnheko-c69d2ef64886ee4946abf4b959d53b884014ce7a.tar.xz
Fix off by 1 in previousRoom condition
-rw-r--r--src/timeline/RoomlistModel.cpp2
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());
                 }