diff options
author | Thibaut Girka <thib@sitedethib.com> | 2020-02-15 23:51:24 +0100 |
---|---|---|
committer | ThibG <thib@sitedethib.com> | 2020-02-16 00:10:45 +0100 |
commit | 955f838f9df9a6af4ba2ab51716def6093698c28 (patch) | |
tree | 23336416d2405581fe265dec40b9b383e3ad2ce0 | |
parent | 40798cba4114369ad0f352a2fb8bc33af0c203c3 (diff) |
Fix clicking on the “TOOT” button send bogus visibility parameter
-rw-r--r-- | app/javascript/flavours/glitch/features/compose/components/publisher.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/features/compose/components/publisher.js b/app/javascript/flavours/glitch/features/compose/components/publisher.js index b8d9d98bf..97890f40d 100644 --- a/app/javascript/flavours/glitch/features/compose/components/publisher.js +++ b/app/javascript/flavours/glitch/features/compose/components/publisher.js @@ -38,8 +38,12 @@ class Publisher extends ImmutablePureComponent { sideArm: PropTypes.oneOf(['none', 'direct', 'private', 'unlisted', 'public']), }; + handleSubmit = () => { + this.props.onSubmit(); + }; + 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 computedClass = classNames('composer--publisher', { @@ -105,7 +109,7 @@ class Publisher extends ImmutablePureComponent { } }()} title={`${intl.formatMessage(messages.publish)}: ${intl.formatMessage({ id: `privacy.${privacy}.short` })}`} - onClick={onSubmit} + onClick={this.handleSubmit} disabled={disabled || diff < 0} /> </div> |