summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorByteHamster <info@bytehamster.com>2022-09-15 20:26:24 +0200
committerByteHamster <info@bytehamster.com>2022-09-18 17:59:59 +0200
commit5baa13b53dbe0d8777b4a2537b9c232b0f397e4b (patch)
tree36c24257434a1ea028aff6870e728fc790f0db73 /app
parentad9de4467bac4b8ca235010a6b8532621c3a03e1 (diff)
downloadAntennaPod-5baa13b53dbe0d8777b4a2537b9c232b0f397e4b.zip
Fix loading views inconsistently showing cover
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/de/danoeh/antennapod/adapter/EpisodeItemListAdapter.java3
-rw-r--r--app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java14
2 files changed, 11 insertions, 6 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/EpisodeItemListAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/EpisodeItemListAdapter.java
index 9c2ff2586..644d99e0e 100644
--- a/app/src/main/java/de/danoeh/antennapod/adapter/EpisodeItemListAdapter.java
+++ b/app/src/main/java/de/danoeh/antennapod/adapter/EpisodeItemListAdapter.java
@@ -70,7 +70,10 @@ public class EpisodeItemListAdapter extends SelectableAdapter<EpisodeItemViewHol
@Override
public final void onBindViewHolder(EpisodeItemViewHolder holder, int pos) {
if (pos >= episodes.size()) {
+ beforeBindViewHolder(holder, pos);
holder.bindDummy();
+ afterBindViewHolder(holder, pos);
+ holder.hideSeparatorIfNecessary();
return;
}
diff --git a/app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java b/app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java
index b4a01ed5a..bb57e4bc0 100644
--- a/app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java
+++ b/app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java
@@ -199,6 +199,7 @@ public class EpisodeItemViewHolder extends RecyclerView.ViewHolder {
}
public void bindDummy() {
+ item = new FeedItem();
container.setAlpha(0.1f);
secondaryActionIcon.setImageDrawable(null);
isInbox.setVisibility(View.VISIBLE);
@@ -215,12 +216,13 @@ public class EpisodeItemViewHolder extends RecyclerView.ViewHolder {
size.setText("");
itemView.setBackgroundResource(ThemeUtils.getDrawableFromAttr(activity, R.attr.selectableItemBackground));
placeholder.setText("");
- new CoverLoader(activity)
- .withResource(ThemeUtils.getDrawableFromAttr(activity, android.R.attr.textColorSecondary))
- .withPlaceholderView(placeholder)
- .withCoverView(cover)
- .load();
- hideSeparatorIfNecessary();
+ if (coverHolder.getVisibility() == View.VISIBLE) {
+ new CoverLoader(activity)
+ .withResource(ThemeUtils.getDrawableFromAttr(activity, android.R.attr.textColorSecondary))
+ .withPlaceholderView(placeholder)
+ .withCoverView(cover)
+ .load();
+ }
}
private void updateDuration(PlaybackPositionEvent event) {