From b9bda129cc321fb8d3c0c120ff70f1721da7a9ca Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Mon, 1 Mar 2021 14:55:48 +0800 Subject: Fix single comment id and message id not passing to ViewPostDetailFragment. --- .../infinityforreddit/activities/ViewPostDetailActivity.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/src/main/java/ml') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPostDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPostDetailActivity.java index bda02b54..9cd7c229 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPostDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPostDetailActivity.java @@ -162,7 +162,6 @@ public class ViewPostDetailActivity extends BaseActivity implements SortTypeSele EventBus.getDefault().post(new NeedForPostListFromPostFragmentEvent(postFragmentId)); } - fragmentManager = getSupportFragmentManager(); if (savedInstanceState == null) { @@ -426,6 +425,8 @@ public class ViewPostDetailActivity extends BaseActivity implements SortTypeSele if (postListPosition == position && post != null) { bundle.putParcelable(ViewPostDetailFragment.EXTRA_POST_DATA, post); bundle.putInt(ViewPostDetailFragment.EXTRA_POST_LIST_POSITION, position); + bundle.putString(ViewPostDetailFragment.EXTRA_SINGLE_COMMENT_ID, getIntent().getStringExtra(EXTRA_SINGLE_COMMENT_ID)); + bundle.putString(ViewPostDetailFragment.EXTRA_MESSAGE_FULLNAME, getIntent().getStringExtra(EXTRA_MESSAGE_FULLNAME)); } else { bundle.putParcelable(ViewPostDetailFragment.EXTRA_POST_DATA, posts.get(position)); bundle.putInt(ViewPostDetailFragment.EXTRA_POST_LIST_POSITION, position); @@ -437,6 +438,8 @@ public class ViewPostDetailActivity extends BaseActivity implements SortTypeSele bundle.putParcelable(ViewPostDetailFragment.EXTRA_POST_DATA, post); bundle.putInt(ViewPostDetailFragment.EXTRA_POST_LIST_POSITION, position); } + bundle.putString(ViewPostDetailFragment.EXTRA_SINGLE_COMMENT_ID, getIntent().getStringExtra(EXTRA_SINGLE_COMMENT_ID)); + bundle.putString(ViewPostDetailFragment.EXTRA_MESSAGE_FULLNAME, getIntent().getStringExtra(EXTRA_MESSAGE_FULLNAME)); } fragment.setArguments(bundle); return fragment; -- cgit v1.2.3