Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/ts/5
This commit is contained in:
commit
59258585b3
24 changed files with 295 additions and 276 deletions
|
@ -33,6 +33,7 @@ import {EnhancedMap, mapDiff} from "../utils/maps";
|
|||
import {setHasDiff} from "../utils/sets";
|
||||
import {ISpaceSummaryEvent, ISpaceSummaryRoom} from "../components/structures/SpaceRoomDirectory";
|
||||
import RoomViewStore from "./RoomViewStore";
|
||||
import {Action} from "../dispatcher/actions";
|
||||
|
||||
interface IState {}
|
||||
|
||||
|
@ -571,6 +572,12 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
|
|||
this.setActiveSpace(null, false);
|
||||
}
|
||||
break;
|
||||
case Action.SwitchSpace:
|
||||
if (payload.num === 0) {
|
||||
this.setActiveSpace(null);
|
||||
} else if (this.spacePanelSpaces.length >= payload.num) {
|
||||
this.setActiveSpace(this.spacePanelSpaces[payload.num - 1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue