Fix comment refreshing bug on single thread view

Closes #143
This commit is contained in:
Balazs Toldi 2023-08-20 10:56:41 +02:00
parent 1f8348bbfa
commit c9e6a0bc2e
No known key found for this signature in database
GPG Key ID: 6C7D440036F99D58

View File

@ -905,7 +905,8 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi
loadedComments.add(comments.get(i).getId());
}
if (mIsSingleCommentThreadMode) {
notifyItemRangeInserted(sizeBefore, comments.size() + 1);
int offset = (comments.size() > 0) ? 1 : 0;
notifyItemRangeInserted(sizeBefore, comments.size() + offset);
} else {
notifyItemRangeInserted(sizeBefore, comments.size());
}