diff options
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java | 12 |
1 files changed, 11 insertions, 1 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 1609bb05..395bdd4d 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java @@ -279,8 +279,14 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi if (isInitiallyLoading) { return VIEW_TYPE_FIRST_LOADING; } else if (isInitiallyLoadingFailed) { + if(mIsSingleCommentThreadMode && position == 0) { + return VIEW_TYPE_VIEW_ALL_COMMENTS; + } return VIEW_TYPE_FIRST_LOADING_FAILED; } else { + if(mIsSingleCommentThreadMode && position == 0) { + return VIEW_TYPE_VIEW_ALL_COMMENTS; + } return VIEW_TYPE_NO_COMMENT_PLACEHOLDER; } } @@ -1137,10 +1143,14 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi @Override public int getItemCount() { - if (isInitiallyLoading || isInitiallyLoadingFailed || mVisibleComments.size() == 0) { + if (isInitiallyLoading) { return 1; } + if (isInitiallyLoadingFailed || mVisibleComments.size() == 0) { + return mIsSingleCommentThreadMode ? 2 : 1; + } + if (mHasMoreComments || loadMoreCommentsFailed) { if (mIsSingleCommentThreadMode) { return mVisibleComments.size() + 2; |