diff options
Diffstat (limited to '')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java | 24 |
1 files changed, 5 insertions, 19 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 6b9d4f54..d0b3cc82 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java @@ -900,25 +900,11 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi public void initiallyLoading() { resetCommentSearchIndex(); - if (mVisibleComments.size() != 0) { - int previousSize = mVisibleComments.size(); - mVisibleComments.clear(); - if (mIsSingleCommentThreadMode) { - notifyItemRangeRemoved(0, previousSize + ((mHasMoreComments || loadMoreCommentsFailed) ? 1 : 0) + 1); - } else { - notifyItemRangeRemoved(0, previousSize + ((mHasMoreComments || loadMoreCommentsFailed) ? 1 : 0)); - } - } - - if (isInitiallyLoading || isInitiallyLoadingFailed) { - isInitiallyLoading = true; - isInitiallyLoadingFailed = false; - notifyItemChanged(0); - } else { - isInitiallyLoading = true; - isInitiallyLoadingFailed = false; - notifyItemInserted(0); - } + notifyItemRangeRemoved(0, getItemCount()); + mVisibleComments.clear(); + isInitiallyLoading = true; + isInitiallyLoadingFailed = false; + notifyItemInserted(0); } public void initiallyLoadCommentsFailed() { |