Skip to content

Commit

Permalink
set dimension undefined to trigger spinner when fetching dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
JediWattson committed Dec 14, 2022
1 parent 9948fca commit 3965cff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/ImageView/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ class ImageView extends PureComponent {
if (!this.props.url) {
return;
}

this.setState({imageHeight: undefined, imageWidth: undefined});
ImageSize.getSize(this.props.url).then(({width, height}) => {
let imageWidth = width;
let imageHeight = height;
Expand Down

0 comments on commit 3965cff

Please sign in to comment.