修复发现萌新页面闪退的问题

This commit is contained in:
huangjian
2021-04-01 17:59:39 +08:00
parent f79e6ae563
commit 4ab00895e9

View File

@@ -43,13 +43,6 @@ public class RoomNewbieListAdapter extends BaseQuickAdapter<RoomNewbieInfo, Base
protected void convert(BaseViewHolder baseViewHolder, final RoomNewbieInfo newbieInfo) {
if (newbieInfo == null) return;
TextView tvAttention = baseViewHolder.getView(R.id.attention_img);
GradientDrawable attentionBg = (GradientDrawable) tvAttention.getBackground();
if (!newbieInfo.isHello()) {
attentionBg.setColor(mContext.getResources().getColor(R.color.color_CCCCCC));
} else {
attentionBg.setColor(mContext.getResources().getColor(R.color.appColor));
}
baseViewHolder.setGone(R.id.view_line,false);
baseViewHolder.setText(R.id.tv_userName, newbieInfo.getNick())
.setVisible(R.id.view_line, baseViewHolder.getLayoutPosition() != getItemCount() - 1)