diff --git a/src/ChatPage.cpp b/src/ChatPage.cpp index 88d393ce..615e96fe 100644 --- a/src/ChatPage.cpp +++ b/src/ChatPage.cpp @@ -140,7 +140,7 @@ ChatPage::ChatPage(QSharedPointer userSettings, QWidget *parent) }); connect(this, &ChatPage::leftRoom, this, &ChatPage::removeRoom); - connect(this, &ChatPage::newRoom, this, &ChatPage::changeRoom, Qt::QueuedConnection); + connect(this, &ChatPage::changeToRoom, this, &ChatPage::changeRoom, Qt::QueuedConnection); connect(this, &ChatPage::notificationsRetrieved, this, &ChatPage::sendNotifications); connect(this, &ChatPage::highlightedNotifsRetrieved, @@ -751,6 +751,7 @@ ChatPage::createRoom(const mtx::requests::CreateRoom &req) QString newRoomId = QString::fromStdString(res.room_id.to_string()); emit showNotification(tr("Room %1 created.").arg(newRoomId)); emit newRoom(newRoomId); + emit changeToRoom(newRoomId); }); } diff --git a/src/ChatPage.h b/src/ChatPage.h index dfe94c37..d79bee46 100644 --- a/src/ChatPage.h +++ b/src/ChatPage.h @@ -125,6 +125,7 @@ signals: void newSyncResponse(const mtx::responses::Sync &res, const std::string &prev_batch_token); void leftRoom(const QString &room_id); void newRoom(const QString &room_id); + void changeToRoom(const QString &room_id); void initializeViews(const mtx::responses::Rooms &rooms); void initializeEmptyViews();