-
Notifications
You must be signed in to change notification settings - Fork 238
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
When initializing a WebImage with isAnimating, if the initial value is false, the image never animates #332
Comments
You're correct. Currently it relies on the extra information passed to SDWebImage level. So the binding may cause issue. I've point this out in the comments here in old version:
If you want to change this logic, this may cause some issue because the non-animated |
The |
@dreampiggy thanks for the explanation! Sorry I missed the doc comments -- that makes sense to me now. At any rate, thanks for the quick fix in #333! |
Released in v3.1.2 |
@dreampiggy thanks so much! |
Given the following code:
When I tap the button, the image will never start animating. It looks like the issue is in
init(url:scale:options:context:isAnimating:transaction:content:)
forWebImage
here:So if the initial value of isAnimating is false, the context never gets an
.animatedImageClass
and therefore the image never animates.This is unexpected -- the
init
accepts aBinding<Bool>
, so if the value changes totrue
, I'd expect the image to start animating.Here's my workaround, which I'd prefer not to do:
When I do this, I can start animating the image by setting the value of my
isAnimating
totrue
.The text was updated successfully, but these errors were encountered: