Fix all rooms being opened on startup

This commit is contained in:
Nicolas Werner 2021-08-17 19:00:00 +02:00
parent 995b62122a
commit 5287ba38f9
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
2 changed files with 3 additions and 1 deletions

View File

@ -140,7 +140,7 @@ ChatPage::ChatPage(QSharedPointer<UserSettings> 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);
});
}

View File

@ -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();