Respect the home page as a context for the Home space (#7216)
parent
3ffe752730
commit
6d3865bdd5
|
@ -230,6 +230,7 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
|
|||
} else {
|
||||
defaultDispatcher.dispatch({
|
||||
action: "view_home_page",
|
||||
context_switch: true,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -854,6 +855,13 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
|
|||
break;
|
||||
}
|
||||
|
||||
case "view_home_page":
|
||||
if (!payload.context_switch && this.enabledMetaSpaces.includes(MetaSpace.Home)) {
|
||||
this.setActiveSpace(MetaSpace.Home, false);
|
||||
window.localStorage.setItem(getSpaceContextKey(this.activeSpace), "");
|
||||
}
|
||||
break;
|
||||
|
||||
case "after_leave_room":
|
||||
if (this._activeSpace[0] === "!" && payload.room_id === this._activeSpace) {
|
||||
// User has left the current space, go to first space
|
||||
|
|
Loading…
Reference in New Issue