fix some compose form errors

This commit is contained in:
Tykayn 2022-03-29 10:40:41 +02:00 committed by tykayn
parent b8723f3fce
commit 7bac99c844

View File

@ -55,7 +55,6 @@ class ComposeForm extends ImmutablePureComponent {
onFetchSuggestions: PropTypes.func, onFetchSuggestions: PropTypes.func,
onSuggestionSelected: PropTypes.func, onSuggestionSelected: PropTypes.func,
onChangeSpoilerText: PropTypes.func, onChangeSpoilerText: PropTypes.func,
onPaste: PropTypes.func,
onPickEmoji: PropTypes.func, onPickEmoji: PropTypes.func,
showSearch: PropTypes.bool, showSearch: PropTypes.bool,
anyMedia: PropTypes.bool, anyMedia: PropTypes.bool,
@ -88,8 +87,7 @@ class ComposeForm extends ImmutablePureComponent {
return [ return [
this.props.spoiler? this.props.spoilerText: '', this.props.spoiler? this.props.spoilerText: '',
countableText(this.props.text), countableText(this.props.text),
this.props.advancedOptions && this.props.advancedOptions.get('do_not_federate') ? ' 👁️' : '' this.props.advancedOptions && this.props.advancedOptions.get('do_not_federate') ? ' 👁️' : ''].join('');
].join('');
} }
canSubmit = () => { canSubmit = () => {
@ -173,7 +171,7 @@ class ComposeForm extends ImmutablePureComponent {
this.handleSubmit(); this.handleSubmit();
} }
if (e.keyCode == 13 && e.altKey) { if (e.keyCode === 13 && e.altKey) {
this.handleSecondarySubmit(); this.handleSecondarySubmit();
} }
} }