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>
pull/21833/head
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
1 changed files with 2 additions and 1 deletions

View File

@ -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) {