Skip to content

Commit

Permalink
fix: image gallery issues (#2835)
Browse files Browse the repository at this point in the history
* fix: infinite image loading issue

* fix: image gallery animations issue
  • Loading branch information
isekovanic authored Dec 10, 2024
1 parent b0fda59 commit 9b2dd77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package/src/components/Attachment/Gallery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ const GalleryImageThumbnail = <
setLoadingImage(false);
setLoadingImageError(true);
}}
onLoadEnd={() => setLoadingImage(false)}
onLoadEnd={() => setTimeout(() => setLoadingImage(false), 0)}
onLoadStart={() => setLoadingImage(true)}
resizeMode={thumbnail.resizeMode}
style={[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ export const useAnimatedGalleryStyle = ({
{ scaleX: -1 },
{ translateY: yScaleOffset },
{
translateX: -translateX.value - xScaleOffset,
translateX: -xScaleOffset,
},
{ scale: oneEighth },
],
};
}, []);
}, [index]);

return [animatedGalleryStyle, animatedStyles];
};

0 comments on commit 9b2dd77

Please sign in to comment.