diff --git a/src/components/AttachmentModal.js b/src/components/AttachmentModal.js
index 8fcf765ef7c5..8231dd7c4fe2 100755
--- a/src/components/AttachmentModal.js
+++ b/src/components/AttachmentModal.js
@@ -443,21 +443,16 @@ function AttachmentModal(props) {
) : (
Boolean(sourceForAttachmentView) &&
shouldLoadAttachment && (
- // We need the following View component on android native
- // So that the event will propagate properly and
- // the Password protected preview will be shown for pdf attachement we are about to send.
-
-
-
+
)
)}
diff --git a/src/components/Attachments/AttachmentView/index.js b/src/components/Attachments/AttachmentView/index.js
index 98086dcc4a0c..de8c0fff45e8 100755
--- a/src/components/Attachments/AttachmentView/index.js
+++ b/src/components/Attachments/AttachmentView/index.js
@@ -122,21 +122,26 @@ function AttachmentView({
if ((_.isString(source) && Str.isPDF(source)) || (file && Str.isPDF(file.name || translate('attachmentView.unknownFilename')))) {
const encryptedSourceUrl = isAuthTokenRequired ? addEncryptedAuthTokenToURL(source) : source;
+ // We need the following View component on android native
+ // So that the event will propagate properly and
+ // the Password protected preview will be shown for pdf attachement we are about to send.
return (
- !loadComplete && setLoadComplete(true)}
- errorLabelStyles={isUsedInAttachmentModal ? [styles.textLabel, styles.textLarge] : [cursor.cursorAuto]}
- style={isUsedInAttachmentModal ? styles.imageModalPDF : styles.flex1}
- />
+
+ !loadComplete && setLoadComplete(true)}
+ errorLabelStyles={isUsedInAttachmentModal ? [styles.textLabel, styles.textLarge] : [cursor.cursorAuto]}
+ style={isUsedInAttachmentModal ? styles.imageModalPDF : styles.flex1}
+ />
+
);
}