-
Notifications
You must be signed in to change notification settings - Fork 948
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
feat(ios): optimize method loadImage:completed: #3626
Conversation
Hi, @Geor9eLau. Thanks for your PR! 👏 🏷️ You can leave a comment in this PR with |
After a quick scan, I have approved workflow to run.
🏷️ New commits in this PR would not be tested automatically until this pull request is reviewed by our collaborators. |
Pay attention 🛎️ !! |
Pay attention 🛎️ !! |
Sorry, closing this PR because it has stalled for over 4 months. |
Pay attention 🛎️ !! |
Sorry, closing this PR because it has stalled for over 4 months. |
In the protocol of HippyImageViewCustomLoader, there is a method called loadImage:completed:. As an iOS developer, we usually use SDWebImage to implement this interface. The loadImage(_:completed:) method is implemented using the loadImage(with:options:progress:completed:) method provided by SDWebImageManager.
However, this implementation encountered some exceptions in practical scenarios. When the loaded image is found in the memory cache, the image parameter in the callback of the SDWebImageManager method has a value, but the data parameter is empty. This causes the image to fail to load in the application.
Therefore, aligning the interface with SDWebImage and internally handling this scenario will make it more convenient for integrators to implement and avoid encountering the same issue as I did.