Simplifie some code

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
pull/21833/head
Šimon Brandner 2021-07-08 18:31:47 +02:00
parent 27db0da437
commit 7a1381135a
No known key found for this signature in database
GPG Key ID: 9760693FDD98A790
1 changed files with 4 additions and 11 deletions

View File

@ -818,17 +818,10 @@ export default class RoomView extends React.Component<IProps, IState> {
case Action.ComposerInsert: { case Action.ComposerInsert: {
// re-dispatch to the correct composer // re-dispatch to the correct composer
if (this.state.editState) {
dis.dispatch({ dis.dispatch({
...payload, ...payload,
action: "edit_composer_insert", action: this.state.editState ? "edit_composer_insert" : "send_composer_insert",
}); });
} else {
dis.dispatch({
...payload,
action: "send_composer_insert",
});
}
break; break;
} }