From 24ed313f60086cba68042cc5ec4ea8a823fc697d Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 9 Aug 2023 14:15:03 +0800 Subject: [PATCH 1/5] =?UTF-8?q?6.5.4=E7=A4=BC=E7=89=A9=E5=86=A0=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/src/main/res/values-en-rUS/string.xml | 2 +- common/src/main/res/values/strings.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/res/values-en-rUS/string.xml b/common/src/main/res/values-en-rUS/string.xml index 15df89771..b8fff674f 100644 --- a/common/src/main/res/values-en-rUS/string.xml +++ b/common/src/main/res/values-en-rUS/string.xml @@ -956,7 +956,7 @@ Limited ride And limited avatar frame Chat Congratulations %s have won %s in the Lucky Angel! The next lucky angel will be you! Congratulations on %s winning %s in Luck 100 %%! Go pass on the good luck! - Guardian group %s people + Guardian %s receive To complete Already collected diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 8f022b06e..f9bb1bbc7 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -956,7 +956,7 @@ Limited ride And limited avatar frame Chat Congratulations %s have won %s in the Lucky Angel! The next lucky angel will be you! Congratulations on %s winning %s in Luck 100 %%! Go pass on the good luck! - Guardian group %s people + Guardian %s receive To complete Already collected From e032e0807b48dd4c50f07b8da5760204d15cce15 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 9 Aug 2023 14:38:33 +0800 Subject: [PATCH 2/5] =?UTF-8?q?6.5.4=E7=A4=BC=E7=89=A9=E5=86=A0=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- live/src/main/java/com/yunbao/live/bean/CoinModel.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/live/src/main/java/com/yunbao/live/bean/CoinModel.java b/live/src/main/java/com/yunbao/live/bean/CoinModel.java index 8e168bd45..67e8595e2 100644 --- a/live/src/main/java/com/yunbao/live/bean/CoinModel.java +++ b/live/src/main/java/com/yunbao/live/bean/CoinModel.java @@ -39,7 +39,7 @@ public class CoinModel extends BaseModel { coin = coin + "k"; } if (999999999999L < coinMoney && coinMoney <= 999999999999999L) { - coin = coin.substring(0, coin.length() - 3); + coin = coin.substring(0, coin.length() - 6); coin = coin + "M"; } return coin; @@ -57,7 +57,7 @@ public class CoinModel extends BaseModel { gold = gold + "k"; } if (999999999999L < goldMoney && goldMoney <= 999999999999999L) { - gold = gold.substring(0, gold.length() - 3); + gold = gold.substring(0, gold.length() - 6); gold = gold + "M"; } return gold; From fea46aab1f2c66362daf22c898a77e2668d7c536 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 9 Aug 2023 17:05:51 +0800 Subject: [PATCH 3/5] =?UTF-8?q?6.5.4=E7=A4=BC=E7=89=A9=E5=86=A0=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/res/layout/dialog_live_gift_popup.xml | 1 + common/src/main/res/values-en-rUS/string.xml | 12 ++++++------ common/src/main/res/values-zh-rHK/strings.xml | 8 ++++---- common/src/main/res/values-zh-rTW/strings.xml | 8 ++++---- common/src/main/res/values-zh/strings.xml | 8 ++++---- common/src/main/res/values/strings.xml | 10 +++++----- .../yunbao/live/activity/LiveAudienceActivity.java | 2 +- .../java/com/yunbao/live/dialog/LiveGiftPopup.java | 1 + 8 files changed, 26 insertions(+), 24 deletions(-) diff --git a/common/src/main/res/layout/dialog_live_gift_popup.xml b/common/src/main/res/layout/dialog_live_gift_popup.xml index a489f4994..01dd778ed 100644 --- a/common/src/main/res/layout/dialog_live_gift_popup.xml +++ b/common/src/main/res/layout/dialog_live_gift_popup.xml @@ -356,6 +356,7 @@ android:id="@+id/gift_title" android:layout_width="match_parent" android:layout_height="match_parent" + android:layout_marginEnd="10dp" android:layout_marginStart="8dp" /> number Red successfully Select System Avatar - This function needs to be used to use it after lv.5, please work hard to upgrade ~ + This function needs to be used to use it after lv.5, please work hard to upgrade ~ No matter where you are, I am waiting for you in the live broadcast room ~ Watch LiveNotify %s experience upgrade,%s receive rewards You have reached the highest level! There\'s nothing in the package yet - Custom quantity + Enter count Gift wall Has been lit %s Illustrated book @@ -1282,10 +1282,10 @@ Limited ride And limited avatar frame A rich party: When the price of a single gift received exceeds 50000 diamonds, it is sufficient Illuminate the achievement; Very rich: When receiving 100 gifts priced over 3000 diamonds, i.e This achievement can be illuminated. The current user has a total of 4 achievements, namely being rich and capricious, sharing rain and dew, and giving gifts Gift machines, lighting masters. - Rich and capricious: Accumulated gifts worth 50K, 2M,10M, 100M, 300M, light up the corresponding achievements separately; - Rain and dew evenly: the cumulative Style quantity of gifts given to anchors reaches 10, 20, 50, 100,200, can achieve success; - gift machine: The cumulative number of gifts given reaches 200, 1000, 10K,100K,1M,light up the corresponding achievements separately; - lighting master: The number of unlocked Gift Walls has reached 10, 30, 50 At 100 and 200, light up the corresponding achievements separately. + Rich and willful: the cumulative number of gift value diamonds sent reaches 10M to light up this achievement; + Equal love: The cumulative number of people who have given gifts to the anchor reaches 50 to light up this achievement; + Gift machine: when the accumulated number of gifts reaches 1000, this achievement will be activated; + Lighting Master: Unlock [Gift Wall] reaches 100 to light up this achievement. rule The current event has not sent any gifts Rule introduction diff --git a/common/src/main/res/values-zh-rHK/strings.xml b/common/src/main/res/values-zh-rHK/strings.xml index c4f091157..3742dc4ea 100644 --- a/common/src/main/res/values-zh-rHK/strings.xml +++ b/common/src/main/res/values-zh-rHK/strings.xml @@ -1278,10 +1278,10 @@ 富甲一方:收到的單款禮物價格超過50000鑽時,即可點亮該成就; 腰纏萬貫:當收到100款價格超過3000鑽的禮物時,即可點亮該成就。 當前用戶共有4個成就,分別是有錢任性、雨露均沾、送禮機器、點燈大師。 - 有錢任性:纍計送出禮物價值鉆石數量達到50K、2M、10M、100M、300M時,分別點亮對應的成就 - 雨露均沾:纍計送禮給主播人數達到10、20、50、100、200時,分別點亮對應的成就; - 送禮機器:纍計贈送禮物個數達到200、1000、10K、00K、1M時,分別點亮對應的成就; - 點燈大師:解鎖【禮物墻】的數量達到10、30、50、100、200時,分別點亮對應的成就 + 有錢任性:纍計送出禮物價值鉆石數量達到10M點亮该成就; + 雨露均沾:纍計送禮給主播人數達到50點亮该成就; + 送禮機器:纍計贈送禮物個數達到1000點亮该成就; + 點燈大師:解鎖【禮物墻】的數量達到100點亮该成就 規則 当前活动暂未送出任何礼物哦 規則介紹 diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml index abbd53187..df1963a96 100644 --- a/common/src/main/res/values-zh-rTW/strings.xml +++ b/common/src/main/res/values-zh-rTW/strings.xml @@ -1277,10 +1277,10 @@ 富甲一方:收到的單款禮物價格超過50000鑽時,即可點亮該成就; 腰纏萬貫:當收到100款價格超過3000鑽的禮物時,即可點亮該成就。 當前用戶共有4個成就,分別是有錢任性、雨露均沾、送禮機器、點燈大師。 - 有錢任性:纍計送出禮物價值鉆石數量達到50K、2M、10M、100M、300M時,分別點亮對應的成就 - 雨露均沾:纍計送禮給主播人數達到10、20、50、100、200時,分別點亮對應的成就; - 送禮機器:纍計贈送禮物個數達到200、1000、10K、00K、1M時,分別點亮對應的成就; - 點燈大師:解鎖【禮物墻】的數量達到10、30、50、100、200時,分別點亮對應的成就 + 有錢任性:纍計送出禮物價值鉆石數量達到10M點亮该成就; + 雨露均沾:纍計送禮給主播人數達到50點亮该成就; + 送禮機器:纍計贈送禮物個數達到1000點亮该成就; + 點燈大師:解鎖【禮物墻】的數量達到100點亮该成就 規則 当前活动暂未送出任何礼物哦 規則介紹 diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index 74039fbf7..673c59614 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1277,10 +1277,10 @@ 富甲一方:收到的單款禮物價格超過50000鑽時,即可點亮該成就; 腰纏萬貫:當收到100款價格超過3000鑽的禮物時,即可點亮該成就。 當前用戶共有4個成就,分別是有錢任性、雨露均沾、送禮機器、點燈大師。 - 有錢任性:纍計送出禮物價值鉆石數量達到50K、2M、10M、100M、300M時,分別點亮對應的成就 - 雨露均沾:纍計送禮給主播人數達到10、20、50、100、200時,分別點亮對應的成就; - 送禮機器:纍計贈送禮物個數達到200、1000、10K、100K、1M時,分別點亮對應的成就; - 點燈大師:解鎖【禮物墻】的數量達到10、30、50、100、200時,分別點亮對應的成就 + 有錢任性:纍計送出禮物價值鉆石數量達到10M點亮该成就; + 雨露均沾:纍計送禮給主播人數達到50點亮该成就; + 送禮機器:纍計贈送禮物個數達到1000點亮该成就; + 點燈大師:解鎖【禮物墻】的數量達到100點亮该成就 規則 當前活動暫未送出任何禮物哦 規則介紹 diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index f9bb1bbc7..ebf612352 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -1258,7 +1258,7 @@ Limited ride And limited avatar frame %s experience upgrade,%s receive rewards There\'s nothing in the package yet You have reached the highest level! - Custom quantity + Enter count Gift wall Has been lit %s Not lit up @@ -1281,10 +1281,10 @@ Limited ride And limited avatar frame A rich party: When the price of a single gift received exceeds 50000 diamonds, it is sufficient Illuminate the achievement; Very rich: When receiving 100 gifts priced over 3000 diamonds, i.e This achievement can be illuminated. The current user has a total of 4 achievements, namely being rich and capricious, sharing rain and dew, and giving gifts Gift machines, lighting masters. - Rich and capricious: Accumulated gifts worth 50K, 2M,10M, 100M, 300M, light up the corresponding achievements separately; - Rain and dew evenly: the cumulative Style quantity of gifts given to anchors reaches 10, 20, 50, 100,200, can achieve success; - gift machine: The cumulative number of gifts given reaches 200, 1000, 10K,100K,1M,light up the corresponding achievements separately; - lighting master: The number of unlocked Gift Walls has reached 10, 30, 50 At 100 and 200, light up the corresponding achievements separately. + Rich and willful: the cumulative number of gift value diamonds sent reaches 10M to light up this achievement; + Equal love: The cumulative number of people who have given gifts to the anchor reaches 50 to light up this achievement; + Gift machine: when the accumulated number of gifts reaches 1000, this achievement will be activated; + Lighting Master: Unlock [Gift Wall] reaches 100 to light up this achievement. rule Illustrated book Honor achievement diff --git a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java index 3f9a323a4..56bedbc22 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java @@ -1564,7 +1564,7 @@ public class LiveAudienceActivity extends LiveActivity { JSONObject item = (JSONObject) o; List giftlist = JSONArray.parseArray(item.getJSONArray("giftlist").toJSONString(), LiveGiftBean.class); for (LiveGiftBean bean : giftlist) { - if (!bean.getSwf().isEmpty()) { + if (bean!=null&&!bean.getSwf().isEmpty()) { giftBeanList.add(bean); } } diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java b/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java index f071d7058..43a59f7cf 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java @@ -366,6 +366,7 @@ public class LiveGiftPopup extends AbsDialogFragment { @Override public void onFinish() { + getCoin(); // if (mLoading != null) { // mLoading.setVisibility(View.INVISIBLE); // } From dffa71e346ec7f8b2cfe3e3d57765ee3c50b6c0a Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 9 Aug 2023 18:11:42 +0800 Subject: [PATCH 4/5] =?UTF-8?q?6.5.4=E7=A4=BC=E7=89=A9=E5=86=A0=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../adapter/GiftAlreadyWallAdapter.java | 7 ++++- .../common/event/GiftWallItemEvent.java | 1 + .../views/GiftAlreadyWallViewHolder.java | 2 +- .../main/res/layout/popup_gift_wall_item.xml | 2 +- .../live/activity/GiftWallActivity.java | 6 ++-- .../yunbao/live/dialog/GiftWallDialog.java | 30 ++++++++++-------- .../yunbao/live/dialog/GiftWallItemPopup.java | 18 ++++++++--- .../live/views/GiftAlreadyWallFragment.java | 31 ++++++++++--------- .../yunbao/live/views/LiveRoomViewHolder.java | 3 +- 9 files changed, 60 insertions(+), 40 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/adapter/GiftAlreadyWallAdapter.java b/common/src/main/java/com/yunbao/common/adapter/GiftAlreadyWallAdapter.java index 815c8f949..b2c596d4a 100644 --- a/common/src/main/java/com/yunbao/common/adapter/GiftAlreadyWallAdapter.java +++ b/common/src/main/java/com/yunbao/common/adapter/GiftAlreadyWallAdapter.java @@ -16,6 +16,11 @@ import java.util.List; public class GiftAlreadyWallAdapter extends RecyclerView.Adapter { private List giftWall = new ArrayList<>(); + private boolean sbWy;//是否正在直播 + + public GiftAlreadyWallAdapter(boolean sbWy) { + this.sbWy = sbWy; + } @NonNull @Override @@ -27,7 +32,7 @@ public class GiftAlreadyWallAdapter extends RecyclerView.Adapter { @Override public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { GiftAlreadyWallViewHolder withoutWallViewHolder = (GiftAlreadyWallViewHolder) holder; - withoutWallViewHolder.showData(giftWall.get(position)); + withoutWallViewHolder.showData(giftWall.get(position), sbWy); } @Override diff --git a/common/src/main/java/com/yunbao/common/event/GiftWallItemEvent.java b/common/src/main/java/com/yunbao/common/event/GiftWallItemEvent.java index 301d46608..97596c1a2 100644 --- a/common/src/main/java/com/yunbao/common/event/GiftWallItemEvent.java +++ b/common/src/main/java/com/yunbao/common/event/GiftWallItemEvent.java @@ -7,6 +7,7 @@ public class GiftWallItemEvent extends BaseModel { private GiftWallModel giftWallModel; private boolean unlit; + public GiftWallModel getGiftWallModel() { return giftWallModel; } diff --git a/common/src/main/java/com/yunbao/common/views/GiftAlreadyWallViewHolder.java b/common/src/main/java/com/yunbao/common/views/GiftAlreadyWallViewHolder.java index f9e376a54..56fd9798d 100644 --- a/common/src/main/java/com/yunbao/common/views/GiftAlreadyWallViewHolder.java +++ b/common/src/main/java/com/yunbao/common/views/GiftAlreadyWallViewHolder.java @@ -25,7 +25,7 @@ public class GiftAlreadyWallViewHolder extends RecyclerView.ViewHolder { giftNumber = itemView.findViewById(R.id.gift_number); } - public void showData(GiftWallModel giftWallModel) { + public void showData(GiftWallModel giftWallModel,boolean sbWy) { giftTitle.setText(giftWallModel.getGiftname()); giftNumber.setText("*" + giftWallModel.getGiftCountNumber()); ImgLoader.display(itemView.getContext(), giftWallModel.getGifticon(), giftImg); diff --git a/common/src/main/res/layout/popup_gift_wall_item.xml b/common/src/main/res/layout/popup_gift_wall_item.xml index d7fd2c668..ddc60f91b 100644 --- a/common/src/main/res/layout/popup_gift_wall_item.xml +++ b/common/src/main/res/layout/popup_gift_wall_item.xml @@ -130,7 +130,7 @@ { selectTab(textLitIcon, viewLitIcon); FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); - transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, mLiveUid, isLive)); + transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, mLiveUid, isLive,false)); transaction.commit(); }); ViewClicksAntiShake.clicksAntiShake(layoutUnlitIcon, new ViewClicksAntiShake.ViewClicksCallBack() { @@ -157,7 +157,7 @@ public class GiftWallActivity extends AbsActivity { isAttention = intent.getIntExtra("isAttention", 0); isLive = intent.getBooleanExtra("isLive", false); FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); - transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, mLiveUid, isLive)); + transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, mLiveUid, isLive, false)); transaction.commit(); ImgLoader.display(GiftWallActivity.this, mAvatarUrl, avatar); anchorName.setText(mAnchorName); @@ -192,7 +192,7 @@ public class GiftWallActivity extends AbsActivity { @Subscribe(threadMode = ThreadMode.MAIN) public void onGiftWallItemEvent(GiftWallItemEvent event) { new XPopup.Builder(this) - .asCustom(new GiftWallItemPopup(this, event.getGiftWallModel(), event.isUnlit(), mLiveUid, mStream)) + .asCustom(new GiftWallItemPopup(this, event.getGiftWallModel(), event.isUnlit(), mLiveUid, mLiveUid, mStream, false)) .show(); } diff --git a/live/src/main/java/com/yunbao/live/dialog/GiftWallDialog.java b/live/src/main/java/com/yunbao/live/dialog/GiftWallDialog.java index e1a6fe9e4..4dc1ded9b 100644 --- a/live/src/main/java/com/yunbao/live/dialog/GiftWallDialog.java +++ b/live/src/main/java/com/yunbao/live/dialog/GiftWallDialog.java @@ -21,15 +21,10 @@ import com.yunbao.common.event.LiveGiftDialogEvent; import com.yunbao.common.fragment.AllServiceChampionFragment; import com.yunbao.common.fragment.GiftWithoutWallFragment; import com.yunbao.common.glide.ImgLoader; -import com.yunbao.common.http.CommonHttpUtil; -import com.yunbao.common.interfaces.CommonCallback; -import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.live.R; -import com.yunbao.live.activity.LiveActivity; -import com.yunbao.live.event.LiveAudienceEvent; import com.yunbao.live.views.GiftAlreadyWallFragment; import org.greenrobot.eventbus.Subscribe; @@ -50,7 +45,7 @@ public class GiftWallDialog extends AbsDialogFragment { private List tabView = new ArrayList<>(); private String mStream, mAnchorName, mLiveUid, mAvatarUrl, toUid; private int isAttention = 0;//是否关注 0=没关注, - private boolean isLive;//是否正在直播 + private boolean isLive, sbWy;//是否正在直播 @Override public void onActivityCreated(Bundle savedInstanceState) { @@ -83,7 +78,7 @@ public class GiftWallDialog extends AbsDialogFragment { ViewClicksAntiShake.clicksAntiShake(layoutLitIcon, () -> { selectTab(textLitIcon, viewLitIcon); FragmentTransaction transaction = getChildFragmentManager().beginTransaction(); - transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, toUid,isLive)); + transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, toUid, isLive,sbWy)); transaction.commit(); }); ViewClicksAntiShake.clicksAntiShake(layoutUnlitIcon, new ViewClicksAntiShake.ViewClicksCallBack() { @@ -129,7 +124,7 @@ public class GiftWallDialog extends AbsDialogFragment { public void onViewClicks() { new XPopup.Builder(getContext()) .enableDrag(false) - .asCustom(new MedalAchievementPopup(getContext(), isLive, toUid,mLiveUid)) + .asCustom(new MedalAchievementPopup(getContext(), isLive, toUid, mLiveUid)) .show(); } }); @@ -146,10 +141,12 @@ public class GiftWallDialog extends AbsDialogFragment { } }); } + private void forwardHomePage() { - dismiss(); + dismiss(); RouteUtil.forwardUserHome(mContext, mLiveUid, false, mLiveUid, 0); } + private void initDate() { Bundle bundle = getArguments(); if (bundle == null) { @@ -162,14 +159,15 @@ public class GiftWallDialog extends AbsDialogFragment { toUid = bundle.getString("toUid"); isAttention = bundle.getInt("isAttention"); isLive = bundle.getBoolean("isLive"); + sbWy = bundle.getBoolean("SBW"); FragmentTransaction transaction = getChildFragmentManager().beginTransaction(); - transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, toUid,isLive)); + transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, toUid, isLive,sbWy)); transaction.commit(); ImgLoader.display(getContext(), mAvatarUrl, avatar); anchorName.setText(mAnchorName); - if (isLive){ + if (isLive) { textLitIcon.setText(getContext().getString(R.string.lit_icon)); - }else { + } else { textLitIcon.setText(getContext().getString(R.string.been_sent)); } } @@ -227,7 +225,13 @@ public class GiftWallDialog extends AbsDialogFragment { @Subscribe(threadMode = ThreadMode.MAIN) public void onGiftWallItemEvent(GiftWallItemEvent event) { new XPopup.Builder(getActivity()) - .asCustom(new GiftWallItemPopup(getActivity(), event.getGiftWallModel(), event.isUnlit(), mLiveUid, mStream)) + .asCustom(new GiftWallItemPopup(getActivity(), + event.getGiftWallModel(), + event.isUnlit(), + mLiveUid, + toUid, + mStream, + sbWy)) .show(); } diff --git a/live/src/main/java/com/yunbao/live/dialog/GiftWallItemPopup.java b/live/src/main/java/com/yunbao/live/dialog/GiftWallItemPopup.java index e07a3d1a3..6da7e16ba 100644 --- a/live/src/main/java/com/yunbao/live/dialog/GiftWallItemPopup.java +++ b/live/src/main/java/com/yunbao/live/dialog/GiftWallItemPopup.java @@ -3,6 +3,7 @@ package com.yunbao.live.dialog; import android.content.Context; import android.graphics.Color; +import android.text.TextUtils; import android.widget.ImageView; import android.widget.TextView; @@ -14,6 +15,7 @@ import com.yunbao.common.CommonAppConfig; import com.yunbao.common.R; import com.yunbao.common.bean.GiftWallGiftDetail; import com.yunbao.common.bean.GiftWallModel; +import com.yunbao.common.event.LiveGiftDialogEvent; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.live.LiveNetManager; @@ -21,7 +23,6 @@ import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.live.event.LiveAudienceEvent; -import com.yunbao.common.event.LiveGiftDialogEvent; public class GiftWallItemPopup extends CenterPopupView { private CardView layout; @@ -29,16 +30,18 @@ public class GiftWallItemPopup extends CenterPopupView { private TextView price, giftDetailsBtn, distanceNaming, vacantPositionAwaits, giftDetails, vacantPosition; private GiftWallModel giftWallModel; private boolean unlit; - private String mLiveUid, mStream; - private boolean isAnchor = false; + private String mLiveUid, mStream, toUid; + private boolean isAnchor = false, sbWy; public GiftWallItemPopup(@NonNull Context context, GiftWallModel giftWallModel, - boolean unlit, String mLiveUid, String mStream) { + boolean unlit, String mLiveUid, String toUid, String mStream, boolean sbWy) { super(context); this.giftWallModel = giftWallModel; this.unlit = unlit; this.mLiveUid = mLiveUid; + this.toUid = toUid; this.mStream = mStream; + this.sbWy = sbWy; if (this.mLiveUid.equals(CommonAppConfig.getInstance().getUid())) { isAnchor = true; } @@ -66,7 +69,12 @@ public class GiftWallItemPopup extends CenterPopupView { } else { giftDetailsBtn.setText(getContext().getText(R.string.instant_light)); } - if(isAnchor){ + + if (sbWy && TextUtils.equals(mLiveUid, toUid)) { + giftDetailsBtn.setBackgroundResource(R.drawable.background_skip_button); + giftDetailsBtn.setEnabled(true); + giftDetailsBtn.setTextColor(Color.parseColor("#F16D00")); + }else { giftDetailsBtn.setBackgroundResource(R.drawable.background_skip_unselect_button); giftDetailsBtn.setEnabled(false); giftDetailsBtn.setTextColor(Color.parseColor("#F2F2F2")); diff --git a/live/src/main/java/com/yunbao/live/views/GiftAlreadyWallFragment.java b/live/src/main/java/com/yunbao/live/views/GiftAlreadyWallFragment.java index 060ab069a..c8874c3f5 100644 --- a/live/src/main/java/com/yunbao/live/views/GiftAlreadyWallFragment.java +++ b/live/src/main/java/com/yunbao/live/views/GiftAlreadyWallFragment.java @@ -1,8 +1,6 @@ package com.yunbao.live.views; -import android.graphics.Color; import android.os.Bundle; -import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -20,7 +18,6 @@ import com.yunbao.common.event.LiveGiftDialogEvent; import com.yunbao.common.fragment.BaseFragment; import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.live.LiveNetManager; -import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.Bus; import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.live.event.LiveAudienceEvent; @@ -34,7 +31,7 @@ public class GiftAlreadyWallFragment extends BaseFragment { private RecyclerView alreadyList; private GiftAlreadyWallAdapter alreadyWallAdapter; private TextView litIcon, giftAll, unlitIconHint, instantLight; - private boolean isAnchor; + private boolean isAnchor, sbWy; @Override public View createView(LayoutInflater layoutInflater, ViewGroup viewGroup) { @@ -48,6 +45,7 @@ public class GiftAlreadyWallFragment extends BaseFragment { mLiveUid = bundle.getString("mLiveUid"); toUid = bundle.getString("toUid"); isAnchor = bundle.getBoolean("isAnchor"); + isAnchor = bundle.getBoolean("SBW"); } @Override @@ -59,22 +57,20 @@ public class GiftAlreadyWallFragment extends BaseFragment { giftAll = contentView.findViewById(R.id.gift_all); instantLight = contentView.findViewById(R.id.instant_light); unlitIconHint = contentView.findViewById(R.id.unlit_icon_hint); - alreadyWallAdapter = new GiftAlreadyWallAdapter(); + alreadyWallAdapter = new GiftAlreadyWallAdapter(sbWy); alreadyList.setLayoutManager(new GridLayoutManager(getContext(), 3, GridLayoutManager.VERTICAL, false)); alreadyList.setAdapter(alreadyWallAdapter); - if(mLiveUid.equals(CommonAppConfig.getInstance().getUid())){ - instantLight.setBackgroundResource(R.drawable.background_skip_unselect_button); - instantLight.setEnabled(false); - instantLight.setTextColor(Color.parseColor("#F2F2F2")); + if (mLiveUid.equals(CommonAppConfig.getInstance().getUid())) { + instantLight.setVisibility(View.VISIBLE); + } else { + instantLight.setVisibility(View.GONE); } if (isAnchor) { unlitIconHint.setText(getContext().getString(R.string.unlit_icon_hint)); } else { unlitIconHint.setText(getContext().getString(R.string.unlit_icon_hint2)); } - if (TextUtils.equals(IMLoginManager.get(getContext()).getUserInfo().getId() + "", toUid)) { - instantLight.setVisibility(View.VISIBLE); - } + ViewClicksAntiShake.clicksAntiShake(contentView.findViewById(R.id.instant_light), new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { @@ -89,7 +85,7 @@ public class GiftAlreadyWallFragment extends BaseFragment { @Override protected void loadData() { - if (isAnchor){ + if (isAnchor) { LiveNetManager.get(getActivity()). giftAlreadyWall(mLiveUid, toUid, new HttpCallback() { @Override @@ -111,7 +107,7 @@ public class GiftAlreadyWallFragment extends BaseFragment { } }); - }else { + } else { LiveNetManager.get(getActivity()). giftUserSendWall(mLiveUid, toUid, new HttpCallback() { @Override @@ -137,7 +133,11 @@ public class GiftAlreadyWallFragment extends BaseFragment { } - public static GiftAlreadyWallFragment newInstance(String mStream, String mLiveUid, String toUid, boolean isAnchor) { + public static GiftAlreadyWallFragment newInstance(String mStream, + String mLiveUid, + String toUid, + boolean isAnchor, + boolean sbWy) { GiftAlreadyWallFragment liveGiftFragment = new GiftAlreadyWallFragment(); Bundle bundle = new Bundle(); bundle.putString("mStream", mStream); @@ -145,6 +145,7 @@ public class GiftAlreadyWallFragment extends BaseFragment { bundle.putString("mLiveUid", mLiveUid); bundle.putString("toUid", toUid); bundle.putBoolean("isAnchor", isAnchor); + bundle.putBoolean("SBW", sbWy); liveGiftFragment.setArguments(bundle); return liveGiftFragment; } 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 ddbc18bbd..981f40e02 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -453,7 +453,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } } } - }else if("checkNewLetter".equals(str)){ + } else if ("checkNewLetter".equals(str)) { checkNewLetter(); } } @@ -2682,6 +2682,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis bundle.putString("toUid", toUid); bundle.putInt("isAttention", isAttention); bundle.putBoolean("isLive", isAnchor); + bundle.putBoolean("SBW", !(mContext instanceof LiveRyAnchorActivity)); giftWallDialog.setArguments(bundle); giftWallDialog.show(((AbsActivity) mContext).getSupportFragmentManager(), "GiftWallDialog"); From aa809ebaf4c1b71517f6ed91bf210356d3de711c Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Thu, 10 Aug 2023 10:03:01 +0800 Subject: [PATCH 5/5] =?UTF-8?q?6.5.4=E7=A4=BC=E7=89=A9=E5=86=A0=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/yunbao/common/http/PDLiveApi.java | 6 ++++-- .../com/yunbao/common/http/live/LiveNetManager.java | 8 ++++---- .../com/yunbao/live/activity/GiftWallActivity.java | 2 +- .../java/com/yunbao/live/adapter/CodexAdapter.java | 7 ++++--- .../java/com/yunbao/live/dialog/CodexDialog.java | 13 +++++++------ .../java/com/yunbao/live/dialog/GiftWallDialog.java | 2 +- .../java/com/yunbao/live/dialog/LiveGiftPopup.java | 2 ++ .../java/com/yunbao/live/views/CodexViewHolder.java | 4 ++-- 8 files changed, 25 insertions(+), 19 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java index a32b22392..078435eea 100644 --- a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java +++ b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java @@ -913,12 +913,14 @@ public interface PDLiveApi { */ @GET("/api/public/?service=Gift.getGiftGuide") Observable>> getGiftGuide( - @Query("liveuid") String liveUid + @Query("liveuid") String liveUid, + @Query("to_uid") String toUid ); @GET("/api/public/?service=Gift.getGiftGuideHistory") Observable>> getGiftGuideHistory( - @Query("liveuid") String liveUid + @Query("liveuid") String liveUid, + @Query("to_uid") String toUid ); @GET("/api/public/?service=Gift.getUserMedalList") diff --git a/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java b/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java index b628a359e..42ddb6305 100644 --- a/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java +++ b/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java @@ -1984,9 +1984,9 @@ public class LiveNetManager { }).isDisposed(); } - public void getGiftGuide(String liveUid, HttpCallback> callback) { + public void getGiftGuide(String liveUid,String toUid ,HttpCallback> callback) { API.get().pdLiveApi(mContext) - .getGiftGuide(liveUid) + .getGiftGuide(liveUid,toUid) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Consumer>>() { @@ -2006,9 +2006,9 @@ public class LiveNetManager { }).isDisposed(); } - public void getGiftGuideHistory(String liveUid, HttpCallback> callback) { + public void getGiftGuideHistory(String toUid,String liveUid, HttpCallback> callback) { API.get().pdLiveApi(mContext) - .getGiftGuideHistory(liveUid) + .getGiftGuideHistory(liveUid,toUid) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Consumer>>() { diff --git a/live/src/main/java/com/yunbao/live/activity/GiftWallActivity.java b/live/src/main/java/com/yunbao/live/activity/GiftWallActivity.java index 77e6028f5..fcddf7967 100644 --- a/live/src/main/java/com/yunbao/live/activity/GiftWallActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/GiftWallActivity.java @@ -118,7 +118,7 @@ public class GiftWallActivity extends AbsActivity { public void onViewClicks() { new XPopup.Builder(GiftWallActivity.this) .enableDrag(false) - .asCustom(new CodexDialog(GiftWallActivity.this, mStream, mLiveUid, isLive)) + .asCustom(new CodexDialog(GiftWallActivity.this, mStream, mLiveUid, mLiveUid,isLive)) .show(); } }); diff --git a/live/src/main/java/com/yunbao/live/adapter/CodexAdapter.java b/live/src/main/java/com/yunbao/live/adapter/CodexAdapter.java index 3c87cc947..f8554b4ba 100644 --- a/live/src/main/java/com/yunbao/live/adapter/CodexAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/CodexAdapter.java @@ -17,7 +17,7 @@ import java.util.List; public class CodexAdapter extends RecyclerView.Adapter { private List giftGuideModels = new ArrayList<>(); private boolean history; - private String mStream, mLiveUid; + private String mStream, mLiveUid,toUid; @NonNull @Override public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { @@ -28,7 +28,7 @@ public class CodexAdapter extends RecyclerView.Adapter { @Override public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { CodexViewHolder codexViewHolder = (CodexViewHolder) holder; - codexViewHolder.showData(giftGuideModels.get(position), history,mStream,mLiveUid); + codexViewHolder.showData(giftGuideModels.get(position), history,mStream,mLiveUid,toUid); } @Override @@ -36,10 +36,11 @@ public class CodexAdapter extends RecyclerView.Adapter { return giftGuideModels.size(); } - public void addAllData(List mGiftWall, boolean history, String mStream, String mLiveUid) { + public void addAllData(List mGiftWall, boolean history, String mStream, String mLiveUid, String toUid) { this.history = history; this.mStream = mStream; this.mLiveUid = mLiveUid; + this.toUid = toUid; giftGuideModels.clear(); giftGuideModels.addAll(mGiftWall); notifyDataSetChanged(); diff --git a/live/src/main/java/com/yunbao/live/dialog/CodexDialog.java b/live/src/main/java/com/yunbao/live/dialog/CodexDialog.java index a0e192154..e1dcb2c61 100644 --- a/live/src/main/java/com/yunbao/live/dialog/CodexDialog.java +++ b/live/src/main/java/com/yunbao/live/dialog/CodexDialog.java @@ -24,16 +24,17 @@ import org.greenrobot.eventbus.ThreadMode; import java.util.List; public class CodexDialog extends BottomPopupView { - private String mStream, mLiveUid; + private String mStream, mLiveUid, toUid; private RecyclerView liveCodex; private CodexAdapter codexAdapter; private boolean history; - public CodexDialog(@NonNull Context context, String mStream, String mLiveUid, boolean history) { + public CodexDialog(@NonNull Context context, String mStream, String mLiveUid, String toUid, boolean history) { super(context); this.mLiveUid = mLiveUid; this.mStream = mStream; this.history = history; + this.toUid = toUid; } // 返回自定义弹窗的布局 @@ -54,10 +55,10 @@ public class CodexDialog extends BottomPopupView { private void initDate() { if (history) { LiveNetManager.get(getContext()). - getGiftGuideHistory(mLiveUid, new HttpCallback>() { + getGiftGuideHistory(toUid,mLiveUid, new HttpCallback>() { @Override public void onSuccess(List data) { - codexAdapter.addAllData(data,history,mStream,mLiveUid); + codexAdapter.addAllData(data,history,mStream,mLiveUid,toUid); } @Override @@ -67,10 +68,10 @@ public class CodexDialog extends BottomPopupView { }); } else { LiveNetManager.get(getContext()). - getGiftGuide(mLiveUid, new HttpCallback>() { + getGiftGuide(mLiveUid, toUid,new HttpCallback>() { @Override public void onSuccess(List data) { - codexAdapter.addAllData(data,history,mStream,mLiveUid); + codexAdapter.addAllData(data,history,mStream,mLiveUid,toUid); } @Override diff --git a/live/src/main/java/com/yunbao/live/dialog/GiftWallDialog.java b/live/src/main/java/com/yunbao/live/dialog/GiftWallDialog.java index 4dc1ded9b..0e5a1cea6 100644 --- a/live/src/main/java/com/yunbao/live/dialog/GiftWallDialog.java +++ b/live/src/main/java/com/yunbao/live/dialog/GiftWallDialog.java @@ -115,7 +115,7 @@ public class GiftWallDialog extends AbsDialogFragment { public void onViewClicks() { new XPopup.Builder(getContext()) .enableDrag(false) - .asCustom(new CodexDialog(getContext(), mStream, mLiveUid, false)) + .asCustom(new CodexDialog(getContext(), mStream, mLiveUid, toUid,false)) .show(); } }); diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java b/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java index 43a59f7cf..7075cc511 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java @@ -690,11 +690,13 @@ public class LiveGiftPopup extends AbsDialogFragment { } if (liveGiftModel.getType() == 7) { + iconArrow.setVisibility(View.GONE); showBlindProgress(liveGiftModel.getBlind_box_type()); } else { blindBox.setVisibility(View.INVISIBLE); mCount = DEFAULT_COUNT; giftNumber.setText(mCount); + iconArrow.setVisibility(View.VISIBLE); } liveGiftSend.setEnabled(true); giftNumberLayout.setVisibility(View.VISIBLE); diff --git a/live/src/main/java/com/yunbao/live/views/CodexViewHolder.java b/live/src/main/java/com/yunbao/live/views/CodexViewHolder.java index cc5f42643..716bd8767 100644 --- a/live/src/main/java/com/yunbao/live/views/CodexViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/CodexViewHolder.java @@ -37,7 +37,7 @@ public class CodexViewHolder extends RecyclerView.ViewHolder { giftList.setAdapter(codexItemAdapter); } - public void showData(GiftGuideModel giftGuideModel, boolean history, String mStream, String mLiveUid) { + public void showData(GiftGuideModel giftGuideModel, boolean history, String mStream, String mLiveUid, String toUid) { StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append(giftGuideModel.getIlluminateCount()) .append("/") @@ -60,7 +60,7 @@ public class CodexViewHolder extends RecyclerView.ViewHolder { public void onViewClicks() { new XPopup.Builder(itemView.getContext()) .enableDrag(false) - .asCustom(new CodexDialog(itemView.getContext(), mStream, mLiveUid,true)) + .asCustom(new CodexDialog(itemView.getContext(), mStream, mLiveUid,toUid,true)) .show(); } });