Fix video not playing if pressing the fullscreen button in PostDetailRecyclerViewAdapter.

This commit is contained in:
Alex Ning 2021-06-24 21:40:45 +08:00
parent 05338b5a47
commit 51fd4c3749
2 changed files with 8 additions and 10 deletions

View File

@ -1643,6 +1643,7 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
intent.putExtra(ViewVideoActivity.EXTRA_VIDEO_DOWNLOAD_URL, mPost.getVideoDownloadUrl()); intent.putExtra(ViewVideoActivity.EXTRA_VIDEO_DOWNLOAD_URL, mPost.getVideoDownloadUrl());
} }
} else { } else {
intent.setData(Uri.parse(mPost.getVideoUrl()));
intent.putExtra(ViewVideoActivity.EXTRA_VIDEO_DOWNLOAD_URL, mPost.getVideoDownloadUrl()); intent.putExtra(ViewVideoActivity.EXTRA_VIDEO_DOWNLOAD_URL, mPost.getVideoDownloadUrl());
intent.putExtra(ViewVideoActivity.EXTRA_SUBREDDIT, mPost.getSubredditName()); intent.putExtra(ViewVideoActivity.EXTRA_SUBREDDIT, mPost.getSubredditName());
intent.putExtra(ViewVideoActivity.EXTRA_ID, mPost.getId()); intent.putExtra(ViewVideoActivity.EXTRA_ID, mPost.getId());

View File

@ -1112,16 +1112,13 @@ public class ViewPostDetailFragment extends Fragment implements FragmentCommunic
setupMenu(); setupMenu();
mPostAdapter = new PostDetailRecyclerViewAdapter(activity, mPostAdapter = new PostDetailRecyclerViewAdapter(activity,
ViewPostDetailFragment.this, mExecutor, mCustomThemeWrapper, mRetrofit, mOauthRetrofit, mGfycatRetrofit, ViewPostDetailFragment.this, mExecutor, mCustomThemeWrapper,
mRedgifsRetrofit, mRedditDataRoomDatabase, mGlide, mRetrofit, mOauthRetrofit, mGfycatRetrofit, mRedgifsRetrofit,
mWindowWidth, mAccessToken, mAccountName, mPost, mLocale, mRedditDataRoomDatabase, mGlide, mWindowWidth, mAccessToken,
mSingleCommentId, isSingleCommentThreadMode, mSharedPreferences, mAccountName, mPost, mLocale, mSingleCommentId,
mNsfwAndSpoilerSharedPreferences, mExoCreator, new PostDetailRecyclerViewAdapter.PostDetailRecyclerViewAdapterCallback() { isSingleCommentThreadMode, mSharedPreferences,
@Override mNsfwAndSpoilerSharedPreferences, mExoCreator,
public void updatePost(Post post) { post1 -> EventBus.getDefault().post(new PostUpdateEventToPostList(mPost, postListPosition)));
EventBus.getDefault().post(new PostUpdateEventToPostList(mPost, postListPosition));
}
});
mCommentsAdapter = new CommentsRecyclerViewAdapter(activity, mCommentsAdapter = new CommentsRecyclerViewAdapter(activity,
ViewPostDetailFragment.this, mCustomThemeWrapper, mExecutor, ViewPostDetailFragment.this, mCustomThemeWrapper, mExecutor,