Skip to content

Commit

Permalink
fix uncache image
Browse files Browse the repository at this point in the history
  • Loading branch information
tienifr committed Feb 14, 2024
1 parent ef897df commit 07d77a4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/ImageWithSizeCalculation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,14 @@ function ImageWithSizeCalculation({url, style, onMeasure, isAuthTokenRequired}:

const onError = () => {
Log.hmmm('Unable to fetch image to calculate size', {url});
if (isLoadedRef.current) {
isLoadedRef.current = false;
setIsImageCached(false);
}
if (isOffline) {
return;
}
setIsLoading(false);
setIsImageCached(true);
};

const imageLoadedSuccessfully = (event: OnLoadNativeEvent) => {
Expand Down

0 comments on commit 07d77a4

Please sign in to comment.