oblador/react-native-image-progress

Progress doesn't disappear for cached images

varungupta85 opened this issue · 1 comments

I am using this package along with react-native-fast-image. The first time when the image is opened, the progress bar is shown as expected and the progress bar disappears after the image is downloaded. But after that, when I view the image again, the progress bar is shown again and it just stays there. I expected the progress bar to not show up at all as the image is already cached. I tried using different values for threshold but that didn't help.

Below is the code to show the image

<ImageWithProgress
          source={{ uri: this.props.imagePath }}
          style={{
            position: 'absolute',
            right: 0,
            left: 0,
            top: 0,
            bottom: 0
          }}
          indicator={ProgressBar}
          indicatorProps={{
            size: 80,
            borderWidth: 0,
            color: 'rgba(150, 150, 150, 1)',
            unfilledColor: 'rgba(200, 200, 200, 0.2)'
          }}
          threshold={200}
        />

Below is a gif showing the continuous progress bar
progressimage

I am not sure if this is an issue or I am missing something in the code. Please comment either ways.

I am trying this on iOS emulator.

Version information:
react-native-image-progress - 1.0.1
react-native-progress - 3.4.0
react-native-fast-image - 2.0.1
react-native - 0.52.4

This was an issue with react-native-fast-image where the onLoad was not invoked in certain cases. DylanVann/react-native-fast-image#74