View video or image to mark the post as read.

This commit is contained in:
Alex Ning 2020-12-07 21:39:34 +08:00
parent 8e05bac936
commit 0d232fc4b8

View File

@ -1981,6 +1981,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
} }
Post post = getItem(position); Post post = getItem(position);
if (post != null) { if (post != null) {
((PostBaseViewHolder) this).markPostRead(post);
Intent intent = new Intent(mActivity, ViewVideoActivity.class); Intent intent = new Intent(mActivity, ViewVideoActivity.class);
if (post.isGfycat()) { if (post.isGfycat()) {
intent.putExtra(ViewVideoActivity.EXTRA_VIDEO_TYPE, ViewVideoActivity.VIDEO_TYPE_GFYCAT); intent.putExtra(ViewVideoActivity.EXTRA_VIDEO_TYPE, ViewVideoActivity.VIDEO_TYPE_GFYCAT);
@ -2225,6 +2226,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
} }
Post post = getItem(position); Post post = getItem(position);
if (post != null) { if (post != null) {
((PostBaseViewHolder) this).markPostRead(post);
if (post.getPostType() == Post.VIDEO_TYPE) { if (post.getPostType() == Post.VIDEO_TYPE) {
Intent intent = new Intent(mActivity, ViewVideoActivity.class); Intent intent = new Intent(mActivity, ViewVideoActivity.class);
if (post.isGfycat()) { if (post.isGfycat()) {
@ -2600,6 +2602,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
} }
Post post = getItem(position); Post post = getItem(position);
if (post != null) { if (post != null) {
markPostRead(post);
if (post.getPostType() == Post.VIDEO_TYPE) { if (post.getPostType() == Post.VIDEO_TYPE) {
Intent intent = new Intent(mActivity, ViewVideoActivity.class); Intent intent = new Intent(mActivity, ViewVideoActivity.class);
if (post.isGfycat()) { if (post.isGfycat()) {