Updated submitCompose to take in groupId intead of group

• Updated:
- submitCompose to take in groupId intead of group
This commit is contained in:
mgabdev
2020-07-14 00:26:46 -05:00
parent 84106dbe99
commit 1c1bfabb17
3 changed files with 7 additions and 6 deletions

View File

@@ -141,14 +141,15 @@ class ComposeForm extends ImmutablePureComponent {
// }
// Submit disabled:
const { isSubmitting, isChangingUpload, isUploading, anyMedia } = this.props;
const { isSubmitting, isChangingUpload, isUploading, anyMedia, group } = this.props;
const fulltext = [this.props.spoilerText, countableText(this.props.text)].join('');
if (isSubmitting || isUploading || isChangingUpload || length(fulltext) > MAX_POST_CHARACTER_COUNT || (fulltext.length !== 0 && fulltext.trim().length === 0 && !anyMedia)) {
return;
}
this.props.onSubmit(this.props.group, this.props.replyToId, this.context.router);
const groupId = group ? group.get('id') : undefined
this.props.onSubmit(groupId, this.props.replyToId, this.context.router);
}
onSuggestionsClearRequested = () => {