首页贡献榜添加隐身

This commit is contained in:
18401019693 2022-09-16 17:27:41 +08:00
parent bebf19215e
commit 0cafd76035
2 changed files with 20 additions and 5 deletions

View File

@ -157,7 +157,7 @@ public class MainListActivity extends AbsActivity {
public void onSuccess(NobleRankHideUserListModel data) {
outRankHide = data.getOutRankHide();
if (mContributeViewHolder != null) {
mContributeViewHolder.setHide(data.getOutRankHide());
mContributeViewHolder.setHide(outRankHide);
}
}

View File

@ -332,6 +332,7 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
} else {
liveing1.setVisibility(View.INVISIBLE);
}
mBtnFollow1.setVisibility(bean.isHide() ? View.GONE : View.VISIBLE);
if (bean.getAttention() == 1) {
mBtnFollow1.doChecked(true);
mBtnFollow1.setText(mFollowing);
@ -377,8 +378,13 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
if (payload == null) {
mItem2.setVisibility(View.VISIBLE);
mItem2.setTag(bean);
ImgLoader.display(mContext, bean.getAvatarThumb(), mAvatar2);
mName2.setText(bean.getUserNiceName());
if (bean.isHide()) {
mName2.setText(R.string.mystery_man);
ImgLoader.display(mContext, R.mipmap.hide, mAvatar2);
} else {
ImgLoader.display(mContext, bean.getAvatarThumb(), mAvatar2);
mName2.setText(bean.getUserNiceName());
}
mVotes2.setText(bean.getTotalCoinFormat() + " ");
mSex2.setImageResource(CommonIconUtil.getSexIcon(bean.getSex()));
LevelBean levelBean = null;
@ -398,6 +404,7 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
} else {
liveing2.setVisibility(View.INVISIBLE);
}
mBtnFollow2.setVisibility(bean.isHide() ? View.GONE : View.VISIBLE);
if (bean.getAttention() == 1) {
mBtnFollow2.doChecked(true);
mBtnFollow2.setText(mFollowing);
@ -409,6 +416,7 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
mBtnFollow2.setBackgroundResource(R.drawable.background_yellow);
mBtnFollow2.setTextColor(Color.parseColor("#FFFFFF"));
}
}
if (topSize > 2) {
ListBean bean = mTopList.get(2);
@ -443,8 +451,13 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
if (payload == null) {
mItem3.setVisibility(View.VISIBLE);
mItem3.setTag(bean);
ImgLoader.display(mContext, bean.getAvatarThumb(), mAvatar3);
mName3.setText(bean.getUserNiceName());
if (bean.isHide()) {
mName3.setText(R.string.mystery_man);
ImgLoader.display(mContext, R.mipmap.hide, mAvatar3);
} else {
ImgLoader.display(mContext, bean.getAvatarThumb(), mAvatar3);
mName3.setText(bean.getUserNiceName());
}
mVotes3.setText(bean.getTotalCoinFormat() + " ");
mSex3.setImageResource(CommonIconUtil.getSexIcon(bean.getSex()));
LevelBean levelBean = null;
@ -464,6 +477,7 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
} else {
liveing3.setVisibility(View.INVISIBLE);
}
mBtnFollow3.setVisibility(bean.isHide() ? View.GONE : View.VISIBLE);
if (bean.getAttention() == 1) {
mBtnFollow3.doChecked(true);
mBtnFollow3.setText(mFollowing);
@ -562,6 +576,7 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
} else {
liveing.setVisibility(View.INVISIBLE);
}
mBtnFollow.setVisibility(bean.isHide() ? View.GONE : View.VISIBLE);
mBtnFollow.setTag(position);
if (bean.getAttention() == 1) {
mBtnFollow.doChecked(true);