diff options
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java index 449bcf6f..df951ee7 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java @@ -2429,20 +2429,20 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie holder.itemView.setBackgroundTintList(ColorStateList.valueOf(mCardViewBackgroundColor)); mGlide.clear(((PostMaterial3CardBaseViewHolder) holder).iconGifImageView); ((PostMaterial3CardBaseViewHolder) holder).titleTextView.setTextColor(mPostTitleColor); - /*if (holder instanceof PostVideoAutoplayViewHolder) { - ((PostVideoAutoplayViewHolder) holder).mediaUri = null; - if (((PostVideoAutoplayViewHolder) holder).fetchGfycatOrStreamableVideoCall != null && !((PostVideoAutoplayViewHolder) holder).fetchGfycatOrStreamableVideoCall.isCanceled()) { - ((PostVideoAutoplayViewHolder) holder).fetchGfycatOrStreamableVideoCall.cancel(); - ((PostVideoAutoplayViewHolder) holder).fetchGfycatOrStreamableVideoCall = null; - } - ((PostVideoAutoplayViewHolder) holder).errorLoadingGfycatImageView.setVisibility(View.GONE); - ((PostVideoAutoplayViewHolder) holder).muteButton.setVisibility(View.GONE); - if (!((PostVideoAutoplayViewHolder) holder).isManuallyPaused) { - ((PostVideoAutoplayViewHolder) holder).resetVolume(); - } - mGlide.clear(((PostVideoAutoplayViewHolder) holder).previewImageView); - ((PostVideoAutoplayViewHolder) holder).previewImageView.setVisibility(View.GONE); - } else*/ if (holder instanceof PostMaterial3CardWithPreviewViewHolder) { + if (holder instanceof PostMaterial3CardBaseVideoAutoplayViewHolder) { + ((PostMaterial3CardBaseVideoAutoplayViewHolder) holder).mediaUri = null; + if (((PostMaterial3CardBaseVideoAutoplayViewHolder) holder).fetchGfycatOrStreamableVideoCall != null && !((PostMaterial3CardBaseVideoAutoplayViewHolder) holder).fetchGfycatOrStreamableVideoCall.isCanceled()) { + ((PostMaterial3CardBaseVideoAutoplayViewHolder) holder).fetchGfycatOrStreamableVideoCall.cancel(); + ((PostMaterial3CardBaseVideoAutoplayViewHolder) holder).fetchGfycatOrStreamableVideoCall = null; + } + ((PostMaterial3CardBaseVideoAutoplayViewHolder) holder).errorLoadingGfycatImageView.setVisibility(View.GONE); + ((PostMaterial3CardBaseVideoAutoplayViewHolder) holder).muteButton.setVisibility(View.GONE); + if (!((PostMaterial3CardBaseVideoAutoplayViewHolder) holder).isManuallyPaused) { + ((PostMaterial3CardBaseVideoAutoplayViewHolder) holder).resetVolume(); + } + mGlide.clear(((PostMaterial3CardBaseVideoAutoplayViewHolder) holder).previewImageView); + ((PostMaterial3CardBaseVideoAutoplayViewHolder) holder).previewImageView.setVisibility(View.GONE); + } else if (holder instanceof PostMaterial3CardWithPreviewViewHolder) { mGlide.clear(((PostMaterial3CardWithPreviewViewHolder) holder).binding.imageViewItemPostCard3WithPreview); ((PostMaterial3CardWithPreviewViewHolder) holder).binding.imageViewItemPostCard3WithPreview.setVisibility(View.GONE); ((PostMaterial3CardWithPreviewViewHolder) holder).binding.imageWrapperRelativeLayoutItemPostCard3WithPreview.setVisibility(View.GONE); |