georstat/react-native-image-cache

Cannot disable animations.

Closed this issue · 4 comments

Attempting to set the animation duration to 0 to essentially disable animations doesn't work because the check for the passed prop is checking for a falsey value not for undefined so 0 is counted as false.

here for the thumbnail: https://github.com/georstat/react-native-image-cache/blob/main/src/CachedImage.tsx#L137

and here for the main image: https://github.com/georstat/react-native-image-cache/blob/main/src/CachedImage.tsx#LL150C5-L155C8

This issue alsoa pplies for the cache manager config

bisak commented

Yup, I'm running into the same issue :)

Setting the animation duration to 1ms is a sort of workaround that’s not noticeable.

Hey folks, sorry for the delay on this one. I've forgotten to fix it on 2.6.0 published earlier today, the fix is now available on 2.7.0: https://github.com/georstat/react-native-image-cache/releases/tag/v2.7.0

Great new @efstathiosntonas thank you!