Merge pull request #745 from ThibG/glitch-soc/fixes/grey-out-button

Disable the “TOOT” button (and secondary toot button) if the toot text is empty
pull/759/head
David Yip 2018-09-29 19:00:06 -05:00 committed by GitHub
commit 5b43d7bcbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -242,7 +242,7 @@ const handlers = {
} }
// Submit disabled: // Submit disabled:
if (isSubmitting || isUploading || (!!text.length && !text.trim().length && !anyMedia)) { if (isSubmitting || isUploading || (!text.trim().length && !anyMedia)) {
return; return;
} }
@ -415,7 +415,7 @@ class Composer extends React.Component {
spoilersAlwaysOn, spoilersAlwaysOn,
} = this.props; } = this.props;
let disabledButton = isSubmitting || isUploading || (!!text.length && !text.trim().length && !anyMedia); let disabledButton = isSubmitting || isUploading || (!text.trim().length && !anyMedia);
return ( return (
<div className='composer'> <div className='composer'>