SDWebImage / SDWebImageSwiftUI

SwiftUI Image loading and Animation framework powered by SDWebImage
https://sdwebimage.github.io/SDWebImageSwiftUI
MIT License
2.1k stars 216 forks source link

fix transition not working #248

Closed wishWinds closed 11 months ago

wishWinds commented 1 year ago

This will fix transition modifier not working. The side effect is transition will always animate even if image is load from memory or disk cache.

dreampiggy commented 1 year ago

I don't think add this into a ObservedObject is suitable...

The correct way maybe put this withAnimation into the WebImage's return body of images

wishWinds commented 1 year ago

It may has no way to trigger animation within onSuccess callback. the imageManager are internal. and exposing the manager is not a good choice. What I'm thinking is give a chance to tell the framework using animation when remote image Is come. I'm thinking add a enableAnimation modifier to WebImage. If you think this may be a right approach. I will make a new PR!

Thanks.

zizooom commented 1 year ago

Thank you

Ziv-Nergal commented 1 year ago

Any updates on this? Still not working for me

aviwad commented 11 months ago

any update? transition still broken

alexfanatics commented 11 months ago

I found a workaround here: https://github.com/SDWebImage/SDWebImageSwiftUI/issues/272

aviwad commented 11 months ago

why did you close the PR?