diff options
author | Alex Ning <chineseperson5@gmail.com> | 2021-06-25 04:46:14 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2021-06-25 04:46:14 +0000 |
commit | 9819059e297e0767ed6a90c4d5c228c320943da4 (patch) | |
tree | 5b6ff4fec369c3ffc3efac456be90e6c5cec836e /app | |
parent | 2236305e191cb1879fe5192bb88eace766a43fdb (diff) | |
download | infinity-for-reddit-9819059e297e0767ed6a90c4d5c228c320943da4.tar infinity-for-reddit-9819059e297e0767ed6a90c4d5c228c320943da4.tar.gz infinity-for-reddit-9819059e297e0767ed6a90c4d5c228c320943da4.tar.bz2 infinity-for-reddit-9819059e297e0767ed6a90c4d5c228c320943da4.tar.lz infinity-for-reddit-9819059e297e0767ed6a90c4d5c228c320943da4.tar.xz infinity-for-reddit-9819059e297e0767ed6a90c4d5c228c320943da4.tar.zst infinity-for-reddit-9819059e297e0767ed6a90c4d5c228c320943da4.zip |
Fix showing wrong comment after user submitted a comment in ViewPostDetailFragment.
Diffstat (limited to 'app')
2 files changed, 2 insertions, 3 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java index 9a443121..4f70b5fb 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java @@ -845,9 +845,9 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi mVisibleComments.add(0, comment); if (isInitiallyLoading) { - notifyItemInserted(2); - } else { notifyItemInserted(1); + } else { + notifyItemInserted(0); } } 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 afa5c5fb..beff863f 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java @@ -570,7 +570,6 @@ public class ViewPostDetailFragment extends Fragment implements FragmentCommunic mRecyclerView.setAdapter(mConcatAdapter); } - if (comments == null) { fetchCommentsRespectRecommendedSort(false); } else { |