调整用户卡片的主播判断
This commit is contained in:
parent
b8ec25c94e
commit
1ee335abf2
@ -300,9 +300,9 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
boolean isAnchor = false;
|
boolean isAnchor = false;
|
||||||
|
|
||||||
private void showData(String data) {
|
private void showData(String data) {
|
||||||
isAnchor = mLiveUid.equals(mToUid);
|
|
||||||
Log.i(TAG, "showData: " + data);
|
Log.i(TAG, "showData: " + data);
|
||||||
JSONObject obj = JSON.parseObject(data);
|
JSONObject obj = JSON.parseObject(data);
|
||||||
|
isAnchor = obj.getInteger("is_anchor")==1;
|
||||||
mUserBean = JSON.toJavaObject(obj, UserBean.class);
|
mUserBean = JSON.toJavaObject(obj, UserBean.class);
|
||||||
|
|
||||||
mToName = obj.getString("user_nicename");
|
mToName = obj.getString("user_nicename");
|
||||||
@ -343,7 +343,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
}
|
}
|
||||||
mName.setText(obj.getString("user_nicename"));
|
mName.setText(obj.getString("user_nicename"));
|
||||||
if (mUserBean.getGoodnum() != null && !mUserBean.getGoodnum().equals("")) {
|
if (mUserBean.getGoodnum() != null && !mUserBean.getGoodnum().equals("")) {
|
||||||
if(obj.getInteger("level_anchor")==1) {
|
if(!isAnchor) {
|
||||||
good_nub_ico.setImageResource(R.mipmap.good_nub);
|
good_nub_ico.setImageResource(R.mipmap.good_nub);
|
||||||
}
|
}
|
||||||
good_nub_ico.setVisibility(View.VISIBLE);
|
good_nub_ico.setVisibility(View.VISIBLE);
|
||||||
@ -354,7 +354,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
}
|
}
|
||||||
mSex.setImageResource(CommonIconUtil.getSexIconForUserCard(obj.getIntValue("sex")));
|
mSex.setImageResource(CommonIconUtil.getSexIconForUserCard(obj.getIntValue("sex")));
|
||||||
LevelBean levelBean;
|
LevelBean levelBean;
|
||||||
if (mLiveUid.equals(mUserBean.getId())) {
|
if (isAnchor) {
|
||||||
levelBean = CommonAppConfig.getInstance().getAnchorLevel(mUserBean.getLevelAnchor());
|
levelBean = CommonAppConfig.getInstance().getAnchorLevel(mUserBean.getLevelAnchor());
|
||||||
userLv.setText("Lv." + mUserBean.getLevelAnchor());
|
userLv.setText("Lv." + mUserBean.getLevelAnchor());
|
||||||
mLvDesc.setText(R.string.live_user_level_anchor);
|
mLvDesc.setText(R.string.live_user_level_anchor);
|
||||||
|
@ -336,6 +336,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
|
|||||||
}
|
}
|
||||||
if ("C".equals(u.getUsers_type())) {
|
if ("C".equals(u.getUsers_type())) {
|
||||||
Constants.isAnchor = true;
|
Constants.isAnchor = true;
|
||||||
|
good_nub_ico.setImageResource(R.mipmap.usercard_good_nub);
|
||||||
if (anchorLevelBean != null) {
|
if (anchorLevelBean != null) {
|
||||||
ImgLoader.display(mContext, CommonAppConfig.getInstance().HOST + anchorLevelBean.getThumb(), mLevel);
|
ImgLoader.display(mContext, CommonAppConfig.getInstance().HOST + anchorLevelBean.getThumb(), mLevel);
|
||||||
ImgLoader.display(mContext, R.mipmap.icon_zhubolv, img_lv_pic);
|
ImgLoader.display(mContext, R.mipmap.icon_zhubolv, img_lv_pic);
|
||||||
|
Loading…
Reference in New Issue
Block a user