Fixes for logging out the active connection

- Don't crash
- Fall back to WelcomePage
This commit is contained in:
Tobias Fella
2025-09-02 15:36:55 +02:00
committed by Tobias Fella
parent 6c57c41993
commit e8ad4a5dee
2 changed files with 12 additions and 2 deletions

View File

@@ -478,9 +478,8 @@ void RoomManager::setConnection(NeoChatConnection *connection)
m_connection = connection;
m_lastRoomConfig = m_config->group(m_connection->userId()).group(u"LastOpenRoom"_s);
if (m_connection != nullptr) {
m_lastRoomConfig = m_config->group(m_connection->userId()).group(u"LastOpenRoom"_s);
connect(m_connection, &NeoChatConnection::showMessage, this, &RoomManager::showMessage);
connect(m_connection, &NeoChatConnection::createdRoom, this, [this](Quotient::Room *room) {
resolveResource(room->id());