Fix restoring the last used space on desktop
This was supposed to work, but it's done in the wrong order. We need to set the current space first, and then select the room - otherwise it doesn't get restored.
This commit is contained in:
@@ -237,7 +237,6 @@ void RoomManager::loadInitialRoom()
|
||||
}
|
||||
|
||||
if (m_isMobile) {
|
||||
// We still need to remember the last space on mobile
|
||||
setCurrentSpace(m_lastSpaceConfig.readEntry(m_connection->userId(), QString()), false);
|
||||
// We don't want to open a room on startup on mobile
|
||||
return;
|
||||
@@ -260,6 +259,7 @@ void RoomManager::openRoomForActiveConnection()
|
||||
setCurrentSpace({}, false);
|
||||
return;
|
||||
}
|
||||
setCurrentSpace(m_lastSpaceConfig.readEntry(m_connection->userId(), QString()), false);
|
||||
const auto &lastRoom = m_lastRoomConfig.readEntry(m_connection->userId(), QString());
|
||||
if (lastRoom.isEmpty() || !m_connection->room(lastRoom)) {
|
||||
setCurrentRoom({});
|
||||
@@ -267,7 +267,6 @@ void RoomManager::openRoomForActiveConnection()
|
||||
m_currentRoom = nullptr;
|
||||
resolveResource(lastRoom);
|
||||
}
|
||||
setCurrentSpace(m_lastSpaceConfig.readEntry(m_connection->userId(), QString()), false);
|
||||
}
|
||||
|
||||
UriResolveResult RoomManager::visitUser(User *user, const QString &action)
|
||||
|
||||
Reference in New Issue
Block a user