diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveUserDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveUserDialogFragment.java index 91cba89f0..b30c1567b 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveUserDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveUserDialogFragment.java @@ -300,9 +300,9 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On boolean isAnchor = false; private void showData(String data) { - isAnchor = mLiveUid.equals(mToUid); Log.i(TAG, "showData: " + data); JSONObject obj = JSON.parseObject(data); + isAnchor = obj.getInteger("is_anchor")==1; mUserBean = JSON.toJavaObject(obj, UserBean.class); mToName = obj.getString("user_nicename"); @@ -343,7 +343,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On } mName.setText(obj.getString("user_nicename")); 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.setVisibility(View.VISIBLE); @@ -354,7 +354,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On } mSex.setImageResource(CommonIconUtil.getSexIconForUserCard(obj.getIntValue("sex"))); LevelBean levelBean; - if (mLiveUid.equals(mUserBean.getId())) { + if (isAnchor) { levelBean = CommonAppConfig.getInstance().getAnchorLevel(mUserBean.getLevelAnchor()); userLv.setText("Lv." + mUserBean.getLevelAnchor()); mLvDesc.setText(R.string.live_user_level_anchor); diff --git a/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java index 5bdff6c19..b4f485e84 100644 --- a/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java @@ -336,6 +336,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi } if ("C".equals(u.getUsers_type())) { Constants.isAnchor = true; + good_nub_ico.setImageResource(R.mipmap.usercard_good_nub); if (anchorLevelBean != null) { ImgLoader.display(mContext, CommonAppConfig.getInstance().HOST + anchorLevelBean.getThumb(), mLevel); ImgLoader.display(mContext, R.mipmap.icon_zhubolv, img_lv_pic);