Fixed loading more comments even though there are no more comments.

This commit is contained in:
Alex Ning 2019-02-21 12:37:58 +08:00
parent 70fcc671d8
commit 3a58964d6c
2 changed files with 3 additions and 2 deletions

View File

@ -191,7 +191,6 @@ class ParseComment {
commaSeparatedChildren.deleteCharAt(commaSeparatedChildren.length() - 1); commaSeparatedChildren.deleteCharAt(commaSeparatedChildren.length() - 1);
parseFailed = false; parseFailed = false;
} catch (JSONException e) { } catch (JSONException e) {
parseMoreCommentBasicInfoListener.onParseMoreCommentBasicInfoFailed();
parseFailed = true; parseFailed = true;
e.printStackTrace(); e.printStackTrace();
} }

View File

@ -494,7 +494,9 @@ public class ViewPostDetailActivity extends AppCompatActivity {
mRecyclerView.setAdapter(mAdapter); mRecyclerView.setAdapter(mAdapter);
mCommentCardView.setVisibility(View.VISIBLE); mCommentCardView.setVisibility(View.VISIBLE);
fetchMoreComment(); if(!mCommaSeparatedChildren.equals("")) {
fetchMoreComment();
}
} else { } else {
mNoCommentWrapperLinearLayout.setVisibility(View.VISIBLE); mNoCommentWrapperLinearLayout.setVisibility(View.VISIBLE);
glide.load(R.drawable.no_comment_indicator).into(mNoCommentImageView); glide.load(R.drawable.no_comment_indicator).into(mNoCommentImageView);