From 65314fae47c0076e8889f4168a7bbc574ca2dc08 Mon Sep 17 00:00:00 2001 From: Miguel Alatzar Date: Wed, 6 May 2020 19:30:42 -0700 Subject: [PATCH] [MM-24706] Use cache only for http URIs (#4257) * Use cache only for http URIs * Style fixes * No need for cache prop * Remove redundant absolute positioning * Cap at two lines --- .../__snapshots__/image_preview.test.js.snap | 6 ++---- app/screens/image_preview/image_preview.js | 13 ++++++------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/app/screens/image_preview/__snapshots__/image_preview.test.js.snap b/app/screens/image_preview/__snapshots__/image_preview.test.js.snap index 2d36508bc..351e9ed6d 100644 --- a/app/screens/image_preview/__snapshots__/image_preview.test.js.snap +++ b/app/screens/image_preview/__snapshots__/image_preview.test.js.snap @@ -186,18 +186,16 @@ exports[`ImagePreview should match snapshot 1`] = ` } style={ Object { - "bottom": 0, "justifyContent": "flex-end", - "left": 0, "maxHeight": 64, "paddingBottom": 0, "paddingHorizontal": 24, - "position": "absolute", - "right": 0, } } > - + {(files[index] && files[index].caption) || ''} @@ -375,12 +379,11 @@ export default class ImagePreview extends PureComponent { const flattenStyle = StyleSheet.flatten(style); const calculatedDimensions = calculateDimensions(height, width, deviceWidth, deviceHeight - statusBar); const imageStyle = {...flattenStyle, ...calculatedDimensions}; - const src = {...source, cache: FastImage.cacheControl.cacheOnly}; return ( @@ -646,10 +649,6 @@ const style = StyleSheet.create({ width: '100%', }, footer: { - position: 'absolute', - bottom: 0, - left: 0, - right: 0, maxHeight: 64, justifyContent: 'flex-end', paddingHorizontal: 24,