Tweak context switching edge case for space invites
This commit is contained in:
parent
e05200269f
commit
e219fe082a
1 changed files with 6 additions and 1 deletions
|
@ -123,7 +123,12 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
|
|||
// view last selected room from space
|
||||
const roomId = window.localStorage.getItem(getSpaceContextKey(this.activeSpace));
|
||||
|
||||
if (roomId && this.matrixClient?.getRoom(roomId)?.getMyMembership() === "join") {
|
||||
// if the space being selected is an invite then always view that invite
|
||||
// else if the last viewed room in this space is joined then view that
|
||||
// else view space home or home depending on what is being clicked on
|
||||
if (space?.getMyMembership !== "invite" &&
|
||||
this.matrixClient?.getRoom(roomId)?.getMyMembership() === "join"
|
||||
) {
|
||||
defaultDispatcher.dispatch({
|
||||
action: "view_room",
|
||||
room_id: roomId,
|
||||
|
|
Loading…
Reference in a new issue