diff --git a/app/components/file_attachment_list/file_attachment_image.js b/app/components/file_attachment_list/file_attachment_image.js index eeeaa1de2..833da5c80 100644 --- a/app/components/file_attachment_list/file_attachment_image.js +++ b/app/components/file_attachment_list/file_attachment_image.js @@ -16,6 +16,8 @@ import {isGif} from 'app/utils/file'; import {emptyFunction} from 'app/utils/general'; import ImageCacheManager from 'app/utils/image_cache_manager'; +import thumb from 'assets/images/thumb.png'; + const IMAGE_SIZE = { Fullsize: 'fullsize', Preview: 'preview', @@ -135,6 +137,8 @@ export default class FileAttachmentImage extends PureComponent { - {(hasDefaultSource && !hasPreview && !hasURI) && + let defaultImage; + if (hasDefaultSource && tintDefaultSource) { + defaultImage = ( + + + {this.props.children} + + + ); + } else { + defaultImage = ( {this.props.children} - } + ); + } + + return ( + + {(hasDefaultSource && !hasPreview && !hasURI) && defaultImage} {hasPreview && !isImageReady && } {hasPreview && - + } ); } } + +const styles = StyleSheet.create({ + defaultImageContainer: { + flex: 1, + position: 'absolute', + height: 80, + width: 80, + alignItems: 'center', + justifyContent: 'center', + }, +}); diff --git a/assets/base/images/thumb.png b/assets/base/images/thumb.png new file mode 100644 index 000000000..4bfe55da5 Binary files /dev/null and b/assets/base/images/thumb.png differ diff --git a/assets/base/images/thumb@2x.png b/assets/base/images/thumb@2x.png new file mode 100644 index 000000000..9fda66633 Binary files /dev/null and b/assets/base/images/thumb@2x.png differ diff --git a/assets/base/images/thumb@3x.png b/assets/base/images/thumb@3x.png new file mode 100644 index 000000000..54816bee0 Binary files /dev/null and b/assets/base/images/thumb@3x.png differ