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);
parseFailed = false;
} catch (JSONException e) {
parseMoreCommentBasicInfoListener.onParseMoreCommentBasicInfoFailed();
parseFailed = true;
e.printStackTrace();
}

View File

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