diff --git a/src/components/AttachmentModal.js b/src/components/AttachmentModal.js index 86eb8c56345e..2dfdb991f9f2 100755 --- a/src/components/AttachmentModal.js +++ b/src/components/AttachmentModal.js @@ -86,6 +86,9 @@ class AttachmentModal extends PureComponent { modalType: CONST.MODAL.MODAL_TYPE.CENTERED_UNSWIPEABLE, isConfirmButtonDisabled: false, confirmButtonFadeAnimation: new Animated.Value(1), + file: props.originalFileName ? { + name: props.originalFileName, + } : undefined, }; this.submitAndClose = this.submitAndClose.bind(this); diff --git a/src/components/AttachmentView.js b/src/components/AttachmentView.js index d749cf4a867b..23e385cb0c23 100755 --- a/src/components/AttachmentView.js +++ b/src/components/AttachmentView.js @@ -97,8 +97,9 @@ const AttachmentView = (props) => { // For this check we use both source and file.name since temporary file source is a blob // both PDFs and images will appear as images when pasted into the the text field - if (Str.isImage(props.source) || (props.file && Str.isImage(props.file.name))) { - const children = ; + const isImage = Str.isImage(props.source); + if (isImage || (props.file && Str.isImage(props.file.name))) { + const children = ; return ( props.onPress ? ( diff --git a/src/components/ImageView/index.js b/src/components/ImageView/index.js index 8c48da7833cd..b05be361c9e1 100644 --- a/src/components/ImageView/index.js +++ b/src/components/ImageView/index.js @@ -35,7 +35,7 @@ class ImageView extends PureComponent { this.trackPointerPosition = this.trackPointerPosition.bind(this); this.state = { - isLoading: false, + isLoading: true, containerHeight: 0, containerWidth: 0, isZoomed: false, @@ -275,7 +275,7 @@ class ImageView extends PureComponent { = 1 ? styles.pRelative : styles.pAbsolute, ...styles.flex1, @@ -285,10 +285,10 @@ class ImageView extends PureComponent { > {({show}) => (