Closed montehurd closed 4 years ago
btw thanks for the great library! it's super useful!
Hey, thanks for reporting and the sample code. I will look into this later today.
URLImage
starts loading from onAppear
callback. What happens in your example, because the view already presented onAppear
won't get called, and therefore loading won't start. To ensure loading starts I added additional trigger to init
. This way URLImage
will always start loading. I also keep old triggers so it can still cancel/resume on appearance callbacks.
The fix is in 2.1.1
Oh very nice! Ya I noticed onAppear
wasn't being re-triggered - have run into similar issues with my own SwiftUI 😜. Thanks for the quick turn-around!
Cool, thanks for verifying. I'm closing the issue.
Summary and/or background Changing initial image url requires a view visibility toggle before the newly fetched image appears.
OS and what device you are using
Version of URLImage library
What you expected would happen When you change the initial url, the new image should be shown after it is fetched.
What actually happens The placeholder is shown even though the image has been retrieved. You must manually hide and show the view before the new image will appear.
Sample code Here's a quick sample which reproduces the issue: