mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-08-19 23:04:42 +00:00
Fix clicking on the “TOOT” button send bogus visibility parameter
This commit is contained in:
parent
40798cba41
commit
955f838f9d
|
@ -38,8 +38,12 @@ class Publisher extends ImmutablePureComponent {
|
||||||
sideArm: PropTypes.oneOf(['none', 'direct', 'private', 'unlisted', 'public']),
|
sideArm: PropTypes.oneOf(['none', 'direct', 'private', 'unlisted', 'public']),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
handleSubmit = () => {
|
||||||
|
this.props.onSubmit();
|
||||||
|
};
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { countText, disabled, intl, onSecondarySubmit, onSubmit, privacy, sideArm } = this.props;
|
const { countText, disabled, intl, onSecondarySubmit, privacy, sideArm } = this.props;
|
||||||
|
|
||||||
const diff = maxChars - length(countText || '');
|
const diff = maxChars - length(countText || '');
|
||||||
const computedClass = classNames('composer--publisher', {
|
const computedClass = classNames('composer--publisher', {
|
||||||
|
@ -105,7 +109,7 @@ class Publisher extends ImmutablePureComponent {
|
||||||
}
|
}
|
||||||
}()}
|
}()}
|
||||||
title={`${intl.formatMessage(messages.publish)}: ${intl.formatMessage({ id: `privacy.${privacy}.short` })}`}
|
title={`${intl.formatMessage(messages.publish)}: ${intl.formatMessage({ id: `privacy.${privacy}.short` })}`}
|
||||||
onClick={onSubmit}
|
onClick={this.handleSubmit}
|
||||||
disabled={disabled || diff < 0}
|
disabled={disabled || diff < 0}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue