fix: 处理 SonarQube 问题

This commit is contained in:
liuyirong
2022-10-09 16:29:48 +08:00
parent 6ec3d21994
commit 7d6fb3e815
127 changed files with 295 additions and 1154 deletions

View File

@ -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);
}
}