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());
}
} 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());

View File

@ -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,