oblador / react-native-image-progress

Progress indicator for networked images in React Native
MIT License
1.72k stars 177 forks source link

Fixed clearing error by onLoadEnd #76

Closed adamlachmann closed 6 years ago

adamlachmann commented 6 years ago

Currently when used in tandem with react-native-fast-image, error state is not being displayed, as onLoadEnd (which clears error from state) is always called at the end of loading cycle, whether loading succeeded or not.

  1. onError - sets error
  2. onLoadEnd - clears error

This PR changes this behavior, so that onLoadEnd preserves error state set up by previous lifecycle listeners

mrnickel commented 6 years ago

@oblador is this going to be merged? It seems to address an issue I'm having with broken images.

oblador commented 6 years ago

Thanks! Released in 1.1.1.