Merge pull request #5924 from matrix-org/t3chguy/fix/17069

Disable spaces context switching for when exploring a space
pull/21833/head
Michael Telatynski 2021-04-27 09:45:58 +01:00 committed by GitHub
commit 62f8c9aab9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -543,7 +543,9 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
// persist last viewed room from a space
if (room.isSpaceRoom()) {
this.setActiveSpace(room);
// Don't context switch when navigating to the space room
// as it will cause you to end up in the wrong room
this.setActiveSpace(room, false);
} else if (!this.getSpaceFilteredRoomIds(this.activeSpace).has(room.roomId)) {
// TODO maybe reverse these first 2 clauses once space panel active is fixed
let parent = this.rootSpaces.find(s => this.spaceFilteredRooms.get(s.roomId)?.has(room.roomId));