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:
Sinharitik589 2022-04-04 12:24:54 +05:30 committed by GitHub
parent 631fd87509
commit 13a51654e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1116,7 +1116,8 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
case Action.ViewRoom: { case Action.ViewRoom: {
// Don't auto-switch rooms when reacting to a context-switch or for new rooms being created // 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 // 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; let roomId = payload.room_id;
if (payload.room_alias && !roomId) { if (payload.room_alias && !roomId) {