Closed kostastsi closed 3 years ago
Hey, this is certainly not intended. Thank you for noticing and detailed report. Fixed in 2.2.2.
Great @dmytro-anokhin !Thank you!
@dmytro-anokhin Could you please update the podspec (for the newer version) too, whenever is possible? Thank you in advance!
sure:
--------------------------------------------------------------------------------
π Congrats
π URLImage (2.2.3) successfully published
π
January 31st, 20:32
π https://cocoapods.org/pods/URLImage
π Tell your friends!
--------------------------------------------------------------------------------
Summary and/or background I tried to pass an identifier in the URLImageOptions object, but noticed that every time the image is getting downloaded. Debugged the URLImage and noticed that the public initializers call the private initializer of URLImage without injecting the options object. So the initializer is always getting the URLImageService.shared.defaultOptions.
Version of URLImage library v. 2.0 - The bug is reproducible in the latest version.
So I use the initializer and pass an object to options
URLImageOptions(identifier: photoId)
But the identifier ends up to 'nil' in the 'getImage' function of InMemoryCache class. Noticed that these two public initialziers do not pass the options object
Is that an issue, or you had something different in mind? Do I have other option of passing an identifier, cause I am not covered by using URL as identifier for caching images.