diff options
Diffstat (limited to 'app/src')
2 files changed, 12 insertions, 2 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java index 0faf9c78..05e1d0c5 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java @@ -2411,10 +2411,15 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy intent.putExtra(ViewVideoActivity.EXTRA_ID, mPost.getId()); } intent.putExtra(ViewVideoActivity.EXTRA_POST_TITLE, mPost.getTitle()); - intent.putExtra(ViewVideoActivity.EXTRA_PROGRESS_SECONDS, helper.getLatestPlaybackInfo().getResumePosition()); + if (helper != null) { + intent.putExtra(ViewVideoActivity.EXTRA_PROGRESS_SECONDS, helper.getLatestPlaybackInfo().getResumePosition()); + } intent.putExtra(ViewVideoActivity.EXTRA_IS_NSFW, mPost.isNSFW()); mActivity.startActivity(intent); }); + + previewImageView.setOnLongClickListener(view -> fullscreenButton.performClick()); + playerView.setOnLongClickListener(view -> fullscreenButton.performClick()); } void bindVideoUri(Uri videoUri) { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java index 869442b8..d9e9c0de 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java @@ -1892,11 +1892,16 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView intent.putExtra(ViewVideoActivity.EXTRA_ID, post.getId()); } intent.putExtra(ViewVideoActivity.EXTRA_POST_TITLE, post.getTitle()); - intent.putExtra(ViewVideoActivity.EXTRA_PROGRESS_SECONDS, helper.getLatestPlaybackInfo().getResumePosition()); + if (helper != null) { + intent.putExtra(ViewVideoActivity.EXTRA_PROGRESS_SECONDS, helper.getLatestPlaybackInfo().getResumePosition()); + } intent.putExtra(ViewVideoActivity.EXTRA_IS_NSFW, post.isNSFW()); mActivity.startActivity(intent); } }); + + previewImageView.setOnLongClickListener(view -> fullscreenButton.performClick()); + videoPlayer.setOnLongClickListener(view -> fullscreenButton.performClick()); } void bindVideoUri(Uri videoUri) { |