Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImageLoader should remove image for bad url #30

Open
markst opened this issue Mar 29, 2022 · 1 comment
Open

ImageLoader should remove image for bad url #30

markst opened this issue Mar 29, 2022 · 1 comment

Comments

@markst
Copy link

markst commented Mar 29, 2022

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

@markst
Copy link
Author

markst commented Mar 29, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant