From 386b6e22ca18bb77cfcde9480ca44b11fa2c0a54 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Tue, 24 Aug 2021 20:59:32 +0800 Subject: Fix an ArrayIndexOutOfBoundsException in CommentsRecyclerViewAdapter. --- .../infinityforreddit/adapters/CommentsRecyclerViewAdapter.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app/src/main') 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 92996de9..14f53a2d 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java @@ -696,8 +696,10 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter= mVisibleComments.size() || placeholderPosition < 0) { + mVisibleComments.get(placeholderPosition).setLoadingMoreChildren(false); + mVisibleComments.get(placeholderPosition).setLoadMoreChildrenFailed(true); + } ((LoadMoreChildCommentsViewHolder) holder).placeholderTextView.setText(R.string.comment_load_more_comments_failed); } -- cgit v1.2.3