diff options
Diffstat (limited to 'src/timeline')
-rw-r--r-- | src/timeline/RoomlistModel.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/timeline/RoomlistModel.cpp b/src/timeline/RoomlistModel.cpp index 1c1057e1..cb800699 100644 --- a/src/timeline/RoomlistModel.cpp +++ b/src/timeline/RoomlistModel.cpp @@ -602,6 +602,10 @@ RoomlistModel::leave(QString roomid) void RoomlistModel::setCurrentRoom(QString roomid) { + if ((currentRoom_ && currentRoom_->roomId() == roomid) || + (currentRoomPreview_ && currentRoomPreview_->roomid() == roomid)) + return; + nhlog::ui()->debug("Trying to switch to: {}", roomid.toStdString()); if (models.contains(roomid)) { currentRoom_ = models.value(roomid); |