diff --git a/app/screens/image_preview/image_preview.js b/app/screens/image_preview/image_preview.js index dc014d4e0..8442b9a23 100644 --- a/app/screens/image_preview/image_preview.js +++ b/app/screens/image_preview/image_preview.js @@ -84,7 +84,7 @@ export default class ImagePreview extends PureComponent { componentDidMount() { InteractionManager.runAfterInteractions(() => { - this.scrollView.scrollTo({x: (this.state.currentFile) * this.state.deviceWidth, animated: false}); + this.scrollView.scrollTo({x: (this.state.currentFile) * this.props.deviceWidth, animated: false}); Animated.timing(this.state.wrapperViewOpacity, { toValue: 1, duration: 100 @@ -93,7 +93,7 @@ export default class ImagePreview extends PureComponent { } componentWillReceiveProps(nextProps) { - if (this.props.deviceWidth !== nextProps.deviceWidth && Platform.OS === 'android') { + if (this.props.deviceWidth !== nextProps.deviceWidth) { InteractionManager.runAfterInteractions(() => { this.scrollView.scrollTo({x: (this.state.currentFile * nextProps.deviceWidth), animated: false}); });