From a1dbdeedf4b69062d8569e6d2ccbd8cfab9140bf Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 31 Aug 2022 18:42:14 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=20=E7=9B=B4?= =?UTF-8?q?=E6=92=AD=E9=96=93UI=E4=BF=AE=E6=94=B9,=E7=B2=89=E4=B8=9D?= =?UTF-8?q?=E5=9B=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- live/src/main/java/com/yunbao/live/socket/SocketRyClient.java | 1 - live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java b/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java index b00c85be3..ae560eebc 100644 --- a/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java +++ b/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java @@ -178,7 +178,6 @@ public class SocketRyClient { } UserBean us = CommonAppConfig.getInstance().getUserBean(); if (map.getString("uid") != null && map.getString("uid").equals(us.getId())) { - LiveAudienceActivity.is_fans = "1"; int num = LiveAudienceActivity.fansNum + 1; LiveRoomViewHolder.setFansNum(num); } diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index 01b0c7d4c..d7bba56d2 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -1416,6 +1416,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis mViewMedal.setVisibility(View.GONE); } else { if (mBtnFollow.getVisibility() == View.VISIBLE) { + LiveAudienceActivity.is_fans = "2"; mBtnFollow.setVisibility(View.GONE); mViewMedal.setVisibility(View.VISIBLE); } From fd057a0dcae19a3b97e8cecfe706a666cb93e54d Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Wed, 31 Aug 2022 18:55:01 +0800 Subject: [PATCH 2/5] =?UTF-8?q?update:=E6=A0=B9=E6=8D=AE=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B4=AD=E4=B9=B0=E5=AE=88=E6=8A=A4=E7=95=8C?= =?UTF-8?q?=E9=9D=A2UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java index 0529ccb11..597c92d82 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java @@ -132,7 +132,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements buy2 = mRootView.findViewById(R.id.buy2); guard_tips = mRootView.findViewById(R.id.guard_textView2); - iconCover.setImageResource(R.drawable.guardian_img_wings); + //iconCover.setImageResource(R.drawable.guardian_img_wings); mBtnBuy.setOnClickListener(this); submit.setOnClickListener(this); @@ -201,7 +201,11 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements private void initView() { int guardType = mLiveGuardInfo.getMyGuardType(); if (guardType == Constants.GUARD_TYPE_NONE) { - iconCover.setBackgroundResource(R.drawable.guardian_img_wings); + // iconCover.setBackgroundResource(R.drawable.guardian_img_wings); + userIconOne.setVisibility(View.VISIBLE); + userIconTwo.setVisibility(View.VISIBLE); + ImgLoader.display(mContext, mAncherIcon, userIconOne); + ImgLoader.display(mContext, mUserIcon, userIconTwo); buy1.setVisibility(View.VISIBLE); buy2.setVisibility(View.GONE); } else { From 05e9c63bb5f2977583f660f5f5b7ce70744ad780 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Wed, 31 Aug 2022 19:12:07 +0800 Subject: [PATCH 3/5] =?UTF-8?q?update:=E6=A0=B9=E6=8D=AE=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B4=AD=E4=B9=B0=E5=AE=88=E6=8A=A4=E7=95=8C?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/live/activity/LiveActivity.java | 5 +++-- .../live/dialog/LiveGuardDialogFragment.java | 2 +- .../dialog/LiveNewGuardBuyDialogFragment.java | 19 +++++++++++++++---- .../LiveNewGuardListDialogFragment.java | 2 +- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/live/src/main/java/com/yunbao/live/activity/LiveActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveActivity.java index 4b77b27b8..daca96ade 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveActivity.java @@ -1272,7 +1272,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL public void onSuccess(int code, String msg, String[] info) { List list = JSON.parseArray(Arrays.toString(info), GuardUserBean.class); if(list.isEmpty()){ - openNewBuyGuardWindow(); + openNewBuyGuardWindow(true); }else { LiveNewGuardListDialogFragment fragment = new LiveNewGuardListDialogFragment(); fragment.setList(list); @@ -1340,7 +1340,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL /** * 打开购买新版守护的弹窗 */ - public void openNewBuyGuardWindow() { + public void openNewBuyGuardWindow(boolean isEmpty) { if (TextUtils.isEmpty(mLiveUid) || TextUtils.isEmpty(mStream) || mLiveGuardInfo == null) { return; } @@ -1353,6 +1353,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL bundle.putString(Constants.STREAM, mStream); bundle.putString(Constants.LIVE_ANCHER_ICON, mAncherIcon); bundle.putString(Constants.USER_ICON, CommonAppConfig.getInstance().getUserBean().getAvatar()); + bundle.putBoolean("guard",isEmpty); fragment.setArguments(bundle); fragment.show(getSupportFragmentManager(), "LiveGuardBuyDialogFragment"); } diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveGuardDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveGuardDialogFragment.java index ed0f4a67c..d7303b322 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveGuardDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveGuardDialogFragment.java @@ -164,7 +164,7 @@ public class LiveGuardDialogFragment extends AbsDialogFragment implements View.O @Override public void onClick(View v) { dismiss(); - ((LiveActivity) mContext).openNewBuyGuardWindow(); + ((LiveActivity) mContext).openNewBuyGuardWindow(true); } @Override diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java index 597c92d82..2a5c34d46 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java @@ -80,6 +80,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements private LiveNewGuardBuyItemsAdapter buyItemsAdapter; private GuardRightAdapter mGuardRightAdapter; + private boolean isEmpty; @Override @@ -163,6 +164,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements mUserIcon = bundle.getString(Constants.USER_ICON); String coinName = WordUtil.getString(R.string.diamond); mCoinName = coinName; + isEmpty=bundle.getBoolean("guard",true); // mCoinNameTextView.setText(WordUtil.getString(R.string.guard_my) + coinName + ":"); mCoinNameTextView.setText("快为您喜欢的主播开通守护吧"); anchorName.setText(String.format("成爲%s的守護", mAncherName)); @@ -201,11 +203,20 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements private void initView() { int guardType = mLiveGuardInfo.getMyGuardType(); if (guardType == Constants.GUARD_TYPE_NONE) { + if(isEmpty){ + iconCover.setImageResource(R.drawable.guardian_img_wings); + userIconOne.setVisibility(View.GONE); + userIconTwo.setVisibility(View.GONE); + }else{ + ImgLoader.display(mContext, mAncherIcon, userIconOne); + ImgLoader.display(mContext, mUserIcon, userIconTwo); + userIconOne.setVisibility(View.VISIBLE); + userIconTwo.setVisibility(View.VISIBLE); + + } // iconCover.setBackgroundResource(R.drawable.guardian_img_wings); - userIconOne.setVisibility(View.VISIBLE); - userIconTwo.setVisibility(View.VISIBLE); - ImgLoader.display(mContext, mAncherIcon, userIconOne); - ImgLoader.display(mContext, mUserIcon, userIconTwo); + + buy1.setVisibility(View.VISIBLE); buy2.setVisibility(View.GONE); } else { diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardListDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardListDialogFragment.java index 43da6edc3..aef5b1af2 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardListDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardListDialogFragment.java @@ -168,7 +168,7 @@ public class LiveNewGuardListDialogFragment extends AbsDialogFragment implements @Override public void onClick(View view) { dismiss(); - ((LiveActivity) mContext).openNewBuyGuardWindow(); + ((LiveActivity) mContext).openNewBuyGuardWindow(list.isEmpty()); } @Override From f652c26ac42e2c5d9b3bfbd19342f71e4e2bc98c Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 31 Aug 2022 19:12:38 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=20=E7=9B=B4?= =?UTF-8?q?=E6=92=AD=E9=96=93UI=E4=BF=AE=E6=94=B9,=E7=B2=89=E4=B8=9D?= =?UTF-8?q?=E5=9B=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/live/presenter/LiveLinkMicPresenter.java | 1 + 1 file changed, 1 insertion(+) diff --git a/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicPresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicPresenter.java index 45e206f10..50870f32f 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicPresenter.java @@ -932,6 +932,7 @@ public class LiveLinkMicPresenter implements View.OnClickListener { } public void release() { + EventBus.getDefault().unregister(this); LiveHttpUtil.cancel(LiveHttpConsts.GET_TX_LINK_MIC_ACC_URL); LiveHttpUtil.cancel(LiveHttpConsts.GET_LINK_MIC_STREAM); LiveHttpUtil.cancel(LiveHttpConsts.LINK_MIC_SHOW_VIDEO); From 7805331da6c8c4dbdbe27ebf8e41054246df848a Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 31 Aug 2022 19:15:19 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=20=E7=9B=B4?= =?UTF-8?q?=E6=92=AD=E9=96=93UI=E4=BF=AE=E6=94=B9,=E7=B2=89=E4=B8=9D?= =?UTF-8?q?=E5=9B=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/yunbao/live/views/LiveAudienceViewHolder.java | 1 + 1 file changed, 1 insertion(+) diff --git a/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java index 07dc54aed..faab3c2ac 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java @@ -651,6 +651,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder { public void release() { super.release(); EventBus.getDefault().unregister(this); + removeCallbacks(); } /**