Make sure we're switching out of the space home page when leaving the currently opened space

This commit is contained in:
Tobias Fella
2024-03-28 22:42:27 +01:00
parent ce02183f82
commit 30dd6297ee

View File

@@ -375,6 +375,11 @@ void RoomManager::leaveRoom(NeoChatRoom *room)
m_currentRoom = m_lastCurrentRoom;
m_lastCurrentRoom = nullptr;
Q_EMIT currentRoomChanged();
if (m_currentRoom->isSpace()) {
Q_EMIT replaceSpaceHome(m_currentRoom);
} else {
Q_EMIT replaceRoom(m_currentRoom, {});
}
}
room->forget();