From 1ee335abf2cb661fea85b45aa8afa9f720f3aeae Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Thu, 17 Nov 2022 16:55:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=94=A8=E6=88=B7=E5=8D=A1?= =?UTF-8?q?=E7=89=87=E7=9A=84=E4=B8=BB=E6=92=AD=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/live/dialog/LiveUserDialogFragment.java | 6 +++--- .../main/java/com/yunbao/main/views/MainMeViewHolder.java | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) 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);