Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Spaces selected by default when created (#8085)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* Update src/stores/spaces/SpaceStore.ts

Co-authored-by: Michael Telatynski <[email protected]>

* Added missing bracket

Co-authored-by: Michael Telatynski <[email protected]>
  • Loading branch information
Sinharitik589 and t3chguy authored Apr 4, 2022
1 parent 631fd87 commit 13a5165
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/stores/spaces/SpaceStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 13a5165

Please sign in to comment.