Use this.activeSpace
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
e39f7caf59
commit
c26da1bce6
1 changed files with 1 additions and 2 deletions
|
@ -491,8 +491,7 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
|
|||
switch (payload.action) {
|
||||
case "view_room": {
|
||||
// persist last viewed room from a space
|
||||
const activeSpace = SpaceStore.instance.activeSpace;
|
||||
const activeSpaceId = activeSpace?.roomId || LAST_VIEWED_ROOMS_HOME;
|
||||
const activeSpaceId = this.activeSpace?.roomId || LAST_VIEWED_ROOMS_HOME;
|
||||
const lastViewedRooms = JSON.parse(window.localStorage.getItem(LAST_VIEWED_ROOMS)) || {};
|
||||
|
||||
lastViewedRooms[activeSpaceId] = payload.room_id;
|
||||
|
|
Loading…
Reference in a new issue