Fix all rooms being opened on startup

pull/684/head
Nicolas Werner 3 years ago
parent 995b62122a
commit 5287ba38f9
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 3
      src/ChatPage.cpp
  2. 1
      src/ChatPage.h

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

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

Loading…
Cancel
Save