Don't switch to global DMs when space contains DM
This commit is contained in:
@@ -576,7 +576,8 @@ void RoomManager::setCurrentRoom(const QString &roomId)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m_currentRoom->isDirectChat()) {
|
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);
|
setCurrentSpace("DM"_L1, false);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user