Fix crash on video autoplay

This commit fixes the issue where the app crashes if autoplay is enabled and the user clicks on a post with a video.

Closes #281
This commit is contained in:
Bazsalanszky 2024-08-29 13:51:30 +02:00
parent e8b199a74a
commit 468bae4019

View File

@ -1802,7 +1802,9 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
public PostDetailBaseVideoAutoplayViewHolder(@NonNull View itemView,
AspectRatioGifImageView iconGifImageView,
TextView subredditTextView,
TextView communityInstance,
TextView userTextView,
TextView userInstanceTextView,
TextView authorFlairTextView,
TextView postTimeTextView,
TextView titleTextView,
@ -1828,6 +1830,7 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
ConstraintLayout bottomConstraintLayout,
MaterialButton upvoteButton,
TextView scoreTextView,
TextView downvoteTextView,
MaterialButton downvoteButton,
MaterialButton commentsCountButton,
MaterialButton saveButton,
@ -1835,9 +1838,9 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
super(itemView);
setBaseView(iconGifImageView,
subredditTextView,
mCommunityInstanceTextView,
communityInstance,
userTextView,
mUserInstanceTextView,
userInstanceTextView,
authorFlairTextView,
postTimeTextView,
titleTextView,
@ -1854,7 +1857,7 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
bottomConstraintLayout,
upvoteButton,
scoreTextView,
mDownvoteTextView,
downvoteTextView,
downvoteButton,
commentsCountButton,
saveButton,
@ -2075,7 +2078,9 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
super(binding.getRoot(),
binding.iconGifImageViewItemPostDetailVideoAutoplay,
binding.subredditTextViewItemPostDetailVideoAutoplay,
binding.communityInstanceTextViewItemPostDetailVideoAutoplay,
binding.userTextViewItemPostDetailVideoAutoplay,
binding.userInstanceTextViewItemPostDetailVideoAutoplay,
binding.authorFlairTextViewItemPostDetailVideoAutoplay,
binding.postTimeTextViewItemPostDetailVideoAutoplay,
binding.titleTextViewItemPostDetailVideoAutoplay,
@ -2101,6 +2106,7 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
binding.bottomConstraintLayoutItemPostDetailVideoAutoplay,
binding.upvoteButtonItemPostDetailVideoAutoplay,
binding.scoreTextViewItemPostDetailVideoAutoplay,
binding.downvoteTextViewItemPostDetailVideoAutoplay,
binding.downvoteButtonItemPostDetailVideoAutoplay,
binding.commentsCountButtonItemPostDetailVideoAutoplay,
binding.saveButtonItemPostDetailVideoAutoplay,
@ -2113,7 +2119,9 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
super(binding.getRoot(),
binding.iconGifImageViewItemPostDetailVideoAutoplay,
binding.subredditTextViewItemPostDetailVideoAutoplay,
binding.communityInstanceTextViewItemPostDetailVideoAutoplay,
binding.userTextViewItemPostDetailVideoAutoplay,
binding.userInstanceTextViewItemPostDetailVideoAutoplay,
binding.authorFlairTextViewItemPostDetailVideoAutoplay,
binding.postTimeTextViewItemPostDetailVideoAutoplay,
binding.titleTextViewItemPostDetailVideoAutoplay,
@ -2139,6 +2147,7 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
binding.bottomConstraintLayoutItemPostDetailVideoAutoplay,
binding.upvoteButtonItemPostDetailVideoAutoplay,
binding.scoreTextViewItemPostDetailVideoAutoplay,
binding.downvoteTextViewItemPostDetailVideoAutoplay,
binding.downvoteButtonItemPostDetailVideoAutoplay,
binding.commentsCountButtonItemPostDetailVideoAutoplay,
binding.saveButtonItemPostDetailVideoAutoplay,