SDWebImage / SDWebImageSwiftUI

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

Bug on 3.0.0 #303

Closed arnauddorgans closed 6 months ago

arnauddorgans commented 6 months ago

Since 3.0.0 WebImage is not able to update its URL

on v2.2.7

arnauddorgans commented 6 months ago

I have the same issue on AnimatedImage but only when switching between nil and non nil URL

dreampiggy commented 6 months ago

nil url only ? What's your SDWebImage version, please provide the full Pod version (upload your Podfile.lock)

A reproduce demo is better.

dreampiggy commented 6 months ago

I found a workaround by setting .id(url) but I don't think this is optimized

@arnauddorgans Actually, I compare the 2.x and master branch and found this.

I guess this cause issue ? Why does we still need this identifier ? Is nil url special ?

截屏2024-03-18 16 30 23

Changes from: https://github.com/SDWebImage/SDWebImageSwiftUI/pull/275/files#diff-3974fffe08b7e38a73e0eec23be717410f40a5506bb8ac8ed60920e56f879390L299

dreampiggy commented 6 months ago

I have the same issue on AnimatedImage but only when switching between nil and non nil URL

@arnauddorgans Is that the same issue ? Or is that because of something optimized by me which does not trigger the view update when url is nil ?

dreampiggy commented 6 months ago

Fixed in v3.0.1

arnauddorgans commented 6 months ago

It works perfectly now, thanks! ❤️