diff options
author | Alex Ning <chineseperson5@gmail.com> | 2021-06-24 13:40:45 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2021-06-24 13:40:45 +0000 |
commit | 51fd4c3749fee0c3ee345b0aaf3d107a563b5126 (patch) | |
tree | f170cfd3b137725dc18843d8e210d3b5d6bd34e3 /app/src/main | |
parent | 05338b5a474c8010c9b87dfe9bb28258b3bfb124 (diff) | |
download | infinity-for-reddit-51fd4c3749fee0c3ee345b0aaf3d107a563b5126.tar infinity-for-reddit-51fd4c3749fee0c3ee345b0aaf3d107a563b5126.tar.gz infinity-for-reddit-51fd4c3749fee0c3ee345b0aaf3d107a563b5126.tar.bz2 infinity-for-reddit-51fd4c3749fee0c3ee345b0aaf3d107a563b5126.tar.lz infinity-for-reddit-51fd4c3749fee0c3ee345b0aaf3d107a563b5126.tar.xz infinity-for-reddit-51fd4c3749fee0c3ee345b0aaf3d107a563b5126.tar.zst infinity-for-reddit-51fd4c3749fee0c3ee345b0aaf3d107a563b5126.zip |
Fix video not playing if pressing the fullscreen button in PostDetailRecyclerViewAdapter.
Diffstat (limited to 'app/src/main')
2 files changed, 8 insertions, 10 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 3cc27dc1..323e22c6 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java @@ -1643,6 +1643,7 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler intent.putExtra(ViewVideoActivity.EXTRA_VIDEO_DOWNLOAD_URL, mPost.getVideoDownloadUrl()); } } else { + intent.setData(Uri.parse(mPost.getVideoUrl())); intent.putExtra(ViewVideoActivity.EXTRA_VIDEO_DOWNLOAD_URL, mPost.getVideoDownloadUrl()); intent.putExtra(ViewVideoActivity.EXTRA_SUBREDDIT, mPost.getSubredditName()); intent.putExtra(ViewVideoActivity.EXTRA_ID, mPost.getId()); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java index f98349ab..f94db669 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java @@ -1112,16 +1112,13 @@ public class ViewPostDetailFragment extends Fragment implements FragmentCommunic setupMenu(); mPostAdapter = new PostDetailRecyclerViewAdapter(activity, - ViewPostDetailFragment.this, mExecutor, mCustomThemeWrapper, mRetrofit, mOauthRetrofit, mGfycatRetrofit, - mRedgifsRetrofit, mRedditDataRoomDatabase, mGlide, - mWindowWidth, mAccessToken, mAccountName, mPost, mLocale, - mSingleCommentId, isSingleCommentThreadMode, mSharedPreferences, - mNsfwAndSpoilerSharedPreferences, mExoCreator, new PostDetailRecyclerViewAdapter.PostDetailRecyclerViewAdapterCallback() { - @Override - public void updatePost(Post post) { - EventBus.getDefault().post(new PostUpdateEventToPostList(mPost, postListPosition)); - } - }); + ViewPostDetailFragment.this, mExecutor, mCustomThemeWrapper, + mRetrofit, mOauthRetrofit, mGfycatRetrofit, mRedgifsRetrofit, + mRedditDataRoomDatabase, mGlide, mWindowWidth, mAccessToken, + mAccountName, mPost, mLocale, mSingleCommentId, + isSingleCommentThreadMode, mSharedPreferences, + mNsfwAndSpoilerSharedPreferences, mExoCreator, + post1 -> EventBus.getDefault().post(new PostUpdateEventToPostList(mPost, postListPosition))); mCommentsAdapter = new CommentsRecyclerViewAdapter(activity, ViewPostDetailFragment.this, mCustomThemeWrapper, mExecutor, |