DylanVann / react-native-fast-image

🚩 FastImage, performant React Native image component.
MIT License
8.09k stars 1.47k forks source link

Android FastImage keeps refreshing on background to foreground, iOS is fine. #1022

Open BrandonCao opened 4 months ago

BrandonCao commented 4 months ago

Describe the bug I have an issue where the FastImage component is reloading an image when going from background to foreground. However it's not happening on iOS. I confirmed this by adding console logs to the onLoad, onLoadStart and onLoadEnd props to the component.

Expected behavior Once the image is loaded and the app goes from background to foreground, it does not refetch.

Screenshots If applicable, add screenshots to help explain your problem.

Dependency versions

Note: if these are not the latest versions of each I recommend updating as extra effort will not be taken to be backwards compatible, and updating might resolving your issue.

forchello commented 4 months ago

Hi! I found a solution for this problem, check this out

Just use 8.6.3 version for now and add patch from instruction. Works perfectly

BrandonCao commented 4 months ago

Hi! I found a solution for this problem, check this out

Just use 8.6.3 version for now and add patch from instruction. Works perfectly

it's unfortunately still flickering for me after adding the patch and the images are still refetching when going from BG to FG.

forchello commented 4 months ago

Can you share part of your code where you using fast image?