Remove prototype code from CreateGroupDialog
The prototype code paths prevent users from ending up here, so we don't need custom code.pull/21833/head
parent
c28134eb11
commit
027f263589
|
@ -83,25 +83,11 @@ export default createReactClass({
|
||||||
localpart: this.state.groupId,
|
localpart: this.state.groupId,
|
||||||
profile: profile,
|
profile: profile,
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
if (result.room_id) {
|
|
||||||
dis.dispatch({
|
|
||||||
action: 'view_room',
|
|
||||||
room_id: result.room_id,
|
|
||||||
});
|
|
||||||
|
|
||||||
// Ensure the tag gets selected now that we've created it
|
|
||||||
dis.dispatch({action: 'deselect_tags'}, true);
|
|
||||||
dis.dispatch({
|
|
||||||
action: 'select_tag',
|
|
||||||
tag: result.group_id,
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: 'view_group',
|
action: 'view_group',
|
||||||
group_id: result.group_id,
|
group_id: result.group_id,
|
||||||
group_is_new: true,
|
group_is_new: true,
|
||||||
});
|
});
|
||||||
}
|
|
||||||
this.props.onFinished(true);
|
this.props.onFinished(true);
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
this.setState({createError: e});
|
this.setState({createError: e});
|
||||||
|
|
Loading…
Reference in New Issue