Merge pull request #5923 from ByteHamster/fix-placeholder

Fix placeholder image sometimes missing
This commit is contained in:
ByteHamster 2022-06-03 16:47:10 +02:00 committed by GitHub
commit fd066a648b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -126,7 +126,7 @@ public class CoverLoader {
@Override
public void onLoadFailed(Drawable errorDrawable) {
setPlaceholderVisibility(this.placeholder.get(), true, null);
}
@Override
@ -149,6 +149,7 @@ public class CoverLoader {
if (placeholder != null) {
if (textAndImageCombined || showTitle) {
final Context context = placeholder.getContext();
placeholder.setVisibility(View.VISIBLE);
int bgColor = ContextCompat.getColor(context, R.color.feed_text_bg);
if (palette == null || !showTitle) {
placeholder.setBackgroundColor(bgColor);