Don't allow switching to current room

fixes #634
pull/646/head
Nicolas Werner 3 years ago
parent d81e3f94e7
commit 0a4e95a1db
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 4
      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);

Loading…
Cancel
Save