Show covers on podcast page (#7094)
This commit is contained in:
parent
2043e71299
commit
5e7858ef7e
|
@ -43,8 +43,8 @@ public class EpisodeItemViewHolder extends RecyclerView.ViewHolder {
|
|||
|
||||
private final View container;
|
||||
public final ImageView dragHandle;
|
||||
private final TextView placeholder;
|
||||
private final ImageView cover;
|
||||
public final TextView placeholder;
|
||||
public final ImageView cover;
|
||||
private final TextView title;
|
||||
private final TextView pubDate;
|
||||
private final TextView position;
|
||||
|
|
|
@ -27,6 +27,7 @@ import com.google.android.material.appbar.MaterialToolbar;
|
|||
import com.google.android.material.snackbar.Snackbar;
|
||||
import com.leinardi.android.speeddial.SpeedDialView;
|
||||
|
||||
import de.danoeh.antennapod.ui.CoverLoader;
|
||||
import de.danoeh.antennapod.ui.screen.episode.ItemPagerFragment;
|
||||
import de.danoeh.antennapod.ui.screen.SearchFragment;
|
||||
import de.danoeh.antennapod.ui.TransitionEffect;
|
||||
|
@ -639,7 +640,18 @@ public class FeedItemlistFragment extends Fragment implements AdapterView.OnItem
|
|||
|
||||
@Override
|
||||
protected void beforeBindViewHolder(EpisodeItemViewHolder holder, int pos) {
|
||||
holder.coverHolder.setVisibility(View.GONE);
|
||||
holder.coverHolder.setVisibility(View.GONE); // Load it ourselves
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void afterBindViewHolder(EpisodeItemViewHolder holder, int pos) {
|
||||
holder.coverHolder.setVisibility(View.VISIBLE);
|
||||
new CoverLoader()
|
||||
.withUri(holder.getFeedItem().getImageLocation()) // Ignore "Show episode cover" setting
|
||||
.withFallbackUri(holder.getFeedItem().getFeed().getImageUrl())
|
||||
.withPlaceholderView(holder.placeholder)
|
||||
.withCoverView(holder.cover)
|
||||
.load();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue