Simpler code

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2021-07-08 17:40:41 +02:00
parent 6401577fe4
commit 27db0da437
No known key found for this signature in database
GPG key ID: 9760693FDD98A790

View file

@ -834,17 +834,7 @@ export default class RoomView extends React.Component<IProps, IState> {
case Action.FocusAComposer: { case Action.FocusAComposer: {
// re-dispatch to the correct composer // re-dispatch to the correct composer
if (this.state.editState) { dis.fire(this.state.editState ? Action.FocusEditMessageComposer : Action.FocusSendMessageComposer);
dis.dispatch({
...payload,
action: Action.FocusEditMessageComposer,
});
} else {
dis.dispatch({
...payload,
action: Action.FocusSendMessageComposer,
});
}
break; break;
} }