`ImageLoader` should remove image for bad `url`
markst opened this issue · comments
Mark Turner commented
When using a bad image url for a UImage
:
UImage(url: $viewModel.map({ $0?.image }), loader: .defaultFade)
The existing image is kept, this is a problem when reusing a UImage
.
Since ImageLoader
does check the url is 'valid', perhaps it should reset the image before returning?
https://github.com/MihaelIsaev/UIKitPlus/blob/master/Classes/Objects/ImageLoader.swift#L44
Mark Turner commented
Also wonder why a dispatch on the loaderQueue
is queued from a .main
dispatch?
https://github.com/MihaelIsaev/UIKitPlus/blob/master/Classes/Objects/ImageLoader.swift#L38
Why not simplify and simply dispatch on the loaderQueue
.