Merge pull request #6730 from matrix-org/t3chguy/fix/17974

Don't context switch room on SpaceStore ready as it can break permalinks
pull/21833/head
Michael Telatynski 2021-09-03 16:26:19 +01:00 committed by GitHub
commit 0b07a70b15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -782,7 +782,8 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
// restore selected state from last session if any and still valid
const lastSpaceId = window.localStorage.getItem(ACTIVE_SPACE_LS_KEY);
if (lastSpaceId) {
this.setActiveSpace(this.matrixClient.getRoom(lastSpaceId));
// don't context switch here as it may break permalinks
this.setActiveSpace(this.matrixClient.getRoom(lastSpaceId), false);
}
}