-
Notifications
You must be signed in to change notification settings - Fork 448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: getFrameCount #2568
feat: getFrameCount #2568
Conversation
just signed the CLA |
@@ -15,6 +15,7 @@ describe("Animated Images", () => { | |||
if (!animatedImage) { | |||
return false; | |||
} | |||
animatedImage.getFrameCount(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice! maybe here instead of returning true you can return the frame count and then test its value in expect. I guess in this particular test it will be one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you know exactly how many frames in this testing gif perhaps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no but since it is test against both RN Skia and CanvasKit, if you put the result you get and all test pass it will be the correct result.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so it has a single frame. added test for it
nice looks good |
The CI failed with an error: |
thanks a lot :) |
🎉 This issue has been resolved in version 1.3.11 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This PR implements a new method on AnimatedImage -
getFrameCount
. It's useful when you want to check how many frames in a gif. Sometimes gifs have only a single frame and you'd want to skip the animation and display just it.Also, this PR fixes a typo -
animatedImage.__typename__
was returning"\"AnimatedImage\""
.