Move control of room initial state into createRoom

This changes `createRoom` so it has more control of the room's initial state,
and appends state for different features, rather resetting the entire state
array. This makes room for also controlling encryption state in the next change.
This commit is contained in:
J. Ryan Stinnett 2020-01-23 13:54:28 +00:00
parent 8d59cb4632
commit c25c1878b8
3 changed files with 16 additions and 11 deletions

View file

@ -961,9 +961,9 @@ export default createReactClass({
const CreateRoomDialog = sdk.getComponent('dialogs.CreateRoomDialog');
const modal = Modal.createTrackedDialog('Create Room', '', CreateRoomDialog);
const [shouldCreate, createOpts] = await modal.finished;
const [shouldCreate, opts] = await modal.finished;
if (shouldCreate) {
createRoom({createOpts});
createRoom(opts);
}
},