mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 02:05:45 +03:00
Spaces selected by default when created (#8085)
* Spaces selected by default when created * Spaces selected by default when created * Spaces selected by default when created * Spaces selected by default when created => removed lines intended for room creation * Spaces selected by default when created * Spaces selected by default when created => removed unwanted console log * Spaces selected by default when created => added accidently removed line * Spaces selected by default when created => added accidently removed line * Spaces selected by default when created => linting and brackets added * Update src/stores/spaces/SpaceStore.ts Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> * Update src/stores/spaces/SpaceStore.ts Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> * Added missing bracket Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
631fd87509
commit
13a51654e7
1 changed files with 2 additions and 1 deletions
|
@ -1116,7 +1116,8 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
|
|||
case Action.ViewRoom: {
|
||||
// Don't auto-switch rooms when reacting to a context-switch or for new rooms being created
|
||||
// as this is not helpful and can create loops of rooms/space switching
|
||||
if (payload.context_switch || payload.justCreatedOpts) break;
|
||||
const isSpace = payload.justCreatedOpts?.roomType === RoomType.Space;
|
||||
if (payload.context_switch || (payload.justCreatedOpts && !isSpace)) break;
|
||||
let roomId = payload.room_id;
|
||||
|
||||
if (payload.room_alias && !roomId) {
|
||||
|
|
Loading…
Reference in a new issue