mirror of https://github.com/vector-im/riot-web
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
parent
631fd87509
commit
13a51654e7
|
@ -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 New Issue