diff options
Diffstat (limited to 'app')
2 files changed, 20 insertions, 5 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java index ba59a7fd..fca4fd35 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java @@ -1722,8 +1722,12 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler } }); - previewImageView.setOnLongClickListener(view -> fullscreenButton.performClick()); - playerView.setOnLongClickListener(view -> fullscreenButton.performClick()); + previewImageView.setOnClickListener(view -> fullscreenButton.performClick()); + playerView.setOnClickListener(view -> { + if (playerView.isControllerVisible()) { + fullscreenButton.performClick(); + } + }); } void bindVideoUri(Uri videoUri) { 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 065dbf81..450f37bf 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java @@ -2694,7 +2694,6 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie private Uri mediaUri; private float volume; public Call<String> fetchGfycatOrStreamableVideoCall; - //public FetchGfycatOrRedgifsVideoLinks fetchGfycatOrRedgifsVideoLinks; PostVideoAutoplayViewHolder(View itemView) { super(itemView); @@ -2787,7 +2786,13 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie } }); - previewImageView.setOnLongClickListener(view -> fullscreenButton.performClick()); + previewImageView.setOnClickListener(view -> fullscreenButton.performClick()); + + videoPlayer.setOnClickListener(view -> { + if (videoPlayer.isControllerVisible()) { + fullscreenButton.performClick(); + } + }); } void bindVideoUri(Uri videoUri) { @@ -4096,7 +4101,13 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie } }); - previewImageView.setOnLongClickListener(view -> fullscreenButton.performClick()); + previewImageView.setOnClickListener(view -> fullscreenButton.performClick()); + + videoPlayer.setOnClickListener(view -> { + if (videoPlayer.isControllerVisible()) { + fullscreenButton.performClick(); + } + }); } void bindVideoUri(Uri videoUri) { |