-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
.load(null) can be a valid .load request #268
Comments
Just to justify this a little more - we also do this in a number of projects. |
+1 |
Nice :) Thanks @sjudd! So now, instead of the above
and it's backward compatible! Too bad that I actually diverted from using this method because |
Doing so would also help this scenario, however that 404 may be a little stretch, because that would validly display the |
it would have been more useful if fallback() was able to take any param that load() can take. |
We can re-open and target taking a second request later. It's vastly more complicated to do so, and in many ways similar to functionality you can already get out of thumbnail. |
Actually, lets close this an open a new issue: #451 |
In my app the user can create an entity and then take an OPTIONAL image for that entity.
If the image is not taken the entity's category is shown as the image. Category is mandatory, though it may be called unknown category which is visualized with a styled questionmark :)
So when loading with:
it may be expected to not take any action after setting the
.fallback
drawable:.load
null
Exception
The current implementation treats
null
as an error, but in my case it's a valid non-image. This means that if a user didn't give take a picture it would display a red cross with Glide 3.4.If I place the category image in
.error()
then I lose error indication, which may be appealing to the user (they never get a red cross). But while developing that's not useful and since it's an unexpected case I'm fine with users seeing it. So my current implementation is:The text was updated successfully, but these errors were encountered: