Don't switch to global DMs when space contains DM

This commit is contained in:
Arno Rehn
2025-10-05 17:43:14 +02:00
committed by Tobias Fella
parent 5c49c35b82
commit ba4a83d38c

View File

@@ -576,7 +576,8 @@ void RoomManager::setCurrentRoom(const QString &roomId)
return;
}
if (m_currentRoom->isDirectChat()) {
if (m_currentSpaceId != "DM"_L1) {
const auto roomsInSpace = SpaceHierarchyCache::instance().getRoomListForSpace(m_currentSpaceId, false);
if (!roomsInSpace.contains(m_currentRoom->id()) && m_currentSpaceId != "DM"_L1) {
setCurrentSpace("DM"_L1, false);
}
return;