fix: 处理 SonarQube 问题
This commit is contained in:
@ -18,7 +18,7 @@ import com.gh.gamecenter.core.utils.MtaHelper;
|
||||
import com.gh.gamecenter.common.utils.TextHelper;
|
||||
import com.gh.gamecenter.R;
|
||||
import com.gh.gamecenter.adapter.viewholder.CommentViewHolder;
|
||||
import com.gh.gamecenter.adapter.viewholder.FooterViewHolder;
|
||||
import com.gh.gamecenter.common.viewholder.FooterViewHolder;
|
||||
import com.gh.gamecenter.entity.ArticleCommentParent;
|
||||
import com.gh.gamecenter.entity.CommentEntity;
|
||||
import com.gh.gamecenter.common.retrofit.Response;
|
||||
@ -232,17 +232,17 @@ public class CommentDetailAdapter extends BaseRecyclerAdapter<ViewHolder> {
|
||||
|
||||
private void initFooterViewHolder(FooterViewHolder holder) {
|
||||
if (mIsNetworkError) {
|
||||
holder.loading.setVisibility(View.GONE);
|
||||
holder.hint.setText(R.string.loading_error_network);
|
||||
holder.getLoading().setVisibility(View.GONE);
|
||||
holder.getHint().setText(R.string.loading_error_network);
|
||||
} else if (!mIsOver) {
|
||||
holder.hint.setText(R.string.loading);
|
||||
holder.loading.setVisibility(View.VISIBLE);
|
||||
holder.getHint().setText(R.string.loading);
|
||||
holder.getLoading().setVisibility(View.VISIBLE);
|
||||
} else if (mCommentList.size() == 0) {
|
||||
holder.loading.setVisibility(View.GONE);
|
||||
holder.hint.setText(R.string.comment_empty);
|
||||
holder.getLoading().setVisibility(View.GONE);
|
||||
holder.getHint().setText(R.string.comment_empty);
|
||||
} else {
|
||||
holder.hint.setText(R.string.comment_nomore);
|
||||
holder.loading.setVisibility(View.GONE);
|
||||
holder.getHint().setText(R.string.comment_nomore);
|
||||
holder.getLoading().setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user