-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Issue/glide fallback placeholder #7976
Conversation
@@ -79,55 +78,63 @@ class ImageManager @Inject constructor() { | |||
} | |||
} | |||
|
|||
private fun addPlaceholder(request: GlideRequest<Drawable>, imageType: ImageType): GlideRequest<Drawable> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this might be a good usecase for a private extension function, especially since this is basically a builder pattern
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea, it looks better now!
import javax.inject.Singleton | ||
|
||
@Singleton | ||
class ImagePlaceholderManager @Inject constructor() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love this class 👍 Is it worth testing it? It's probably not necessary
} | ||
} | ||
|
||
fun getPlaceholderImage(imgType: ImageType): Int? { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe let's rename both to getPlaceholderResource
since they are not really returning images?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor comments, overall looks good 👍
Thanks for the review @planarvoid ! It's ready for another round;). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
#7975
Fixes missing placeholder and error images in the Reader. Behavior is basically copied from
WPNetworkImageView.showDefaultImage()
andWPNetworkImageView.showErrorImage()
.To test:
Placeholder
Error