From 44b4561b8bbe73505469afcada66617ff3e2181c Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 2 Sep 2021 13:40:48 +0100 Subject: [PATCH] Don't context switch room on SpaceStore ready as it can break permalinks --- src/stores/SpaceStore.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stores/SpaceStore.tsx b/src/stores/SpaceStore.tsx index 8a7d51b60a..ff99b38fe3 100644 --- a/src/stores/SpaceStore.tsx +++ b/src/stores/SpaceStore.tsx @@ -782,7 +782,8 @@ export class SpaceStoreClass extends AsyncStoreWithClient { // 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); } }