From b27a1f8e0b1f2b01322db6fa67e2fc73871ba562 Mon Sep 17 00:00:00 2001 From: enahum Date: Fri, 24 Nov 2017 20:25:53 -0300 Subject: [PATCH] Fix the ability to send the post when an upload failed (#1195) --- app/components/post_textbox/post_textbox.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/components/post_textbox/post_textbox.js b/app/components/post_textbox/post_textbox.js index 46f234bf2..5b1a76a74 100644 --- a/app/components/post_textbox/post_textbox.js +++ b/app/components/post_textbox/post_textbox.js @@ -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(