Fix the ability to send the post when an upload failed (#1195)

This commit is contained in:
enahum 2017-11-24 20:25:53 -03:00 committed by GitHub
parent dc90ce46ae
commit b27a1f8e0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -99,7 +99,7 @@ class PostTextbox extends PureComponent {
const valueLength = value.trim().length;
if (files.length) {
return valueLength <= MAX_MESSAGE_LENGTH && uploadFileRequestStatus !== RequestStatus.STARTED && files.filter((f) => !f.failed).length > 0;
return valueLength <= MAX_MESSAGE_LENGTH && uploadFileRequestStatus !== RequestStatus.STARTED;
}
return valueLength > 0 && valueLength <= MAX_MESSAGE_LENGTH;
@ -218,8 +218,8 @@ class PostTextbox extends PureComponent {
return;
}
const hasFailedImages = files.some((f) => f.failed);
if (hasFailedImages) {
const hasFailedAttachments = files.some((f) => f.failed);
if (hasFailedAttachments) {
const {intl} = this.props;
Alert.alert(