From e1f4e8dde4f8848b91c85c543e9b76d789c41081 Mon Sep 17 00:00:00 2001
From: zlzw <583819556@qq.com>
Date: Thu, 24 Aug 2023 16:31:14 +0800
Subject: [PATCH] update 6.5.5
---
.../live/activity/LiveAudienceActivity.java | 1 +
.../yunbao/live/dialog/LiveFansFragment.java | 1 +
.../com/yunbao/live/dialog/LiveGiftPopup.java | 1 +
.../live/dialog/ReceiveRendPacketPopup.java | 13 +++--
.../yunbao/live/views/LiveRoomViewHolder.java | 25 ++++----
.../live/views/PortraitLiveManager.java | 3 +
.../main/res/layout/view_send_red_packet.xml | 58 ++++++++++---------
7 files changed, 59 insertions(+), 43 deletions(-)
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 b21768400..a461e1f0b 100644
--- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java
+++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java
@@ -755,6 +755,7 @@ public class LiveAudienceActivity extends LiveActivity {
if (manager != null && !StringUtil.isEmpty(is_fans)) {
if (is_fans.equals("-2")) {
manager.setAttention(0);
+ mLiveRoomViewHolder.setFansGroup("0");
is_fans = "2";
}
}
diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveFansFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveFansFragment.java
index 45a3c034a..d92669e1c 100644
--- a/live/src/main/java/com/yunbao/live/dialog/LiveFansFragment.java
+++ b/live/src/main/java/com/yunbao/live/dialog/LiveFansFragment.java
@@ -132,6 +132,7 @@ public class LiveFansFragment extends AbsDialogFragment {
int num = LiveAudienceActivity.fansNum - 1;
LiveRoomViewHolder.setFansNum(num);
ToastUtil.show("退出成功");
+ EventBus.getDefault().post("exitFansGroup");
dismiss();
} else if (TextUtils.equals(event.getMethod(), "sendFansCard")) {
if (LiveRoomViewHolder.mBtnFollow != null && LiveRoomViewHolder.mBtnFollow.getVisibility() == View.VISIBLE) {
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 a7258c47d..29a5a467d 100644
--- a/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java
+++ b/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java
@@ -785,6 +785,7 @@ public class LiveGiftPopup extends AbsDialogFragment {
if (liveGiftModel.getType() == 7) {
iconArrow.setVisibility(View.GONE);
showBlindProgress(liveGiftModel.getBlind_box_type());
+ description.setTag(liveGiftModel.getBlind_box_type());
} else {
blindBox.setVisibility(View.INVISIBLE);
mCount = DEFAULT_COUNT;
diff --git a/live/src/main/java/com/yunbao/live/dialog/ReceiveRendPacketPopup.java b/live/src/main/java/com/yunbao/live/dialog/ReceiveRendPacketPopup.java
index f71ff4532..3cf62692e 100644
--- a/live/src/main/java/com/yunbao/live/dialog/ReceiveRendPacketPopup.java
+++ b/live/src/main/java/com/yunbao/live/dialog/ReceiveRendPacketPopup.java
@@ -99,11 +99,7 @@ public class ReceiveRendPacketPopup extends CenterPopupView {
}
userID = redPacketInfoModel.getUserId();
- if (redPacketInfoModel.getIsFans()) {
- if (!isFans) {
- ToastUtil.show(R.string.live_rad_pack_join_fans_group_tip);
- }
- }
+
}
private Handler timeHandler = new Handler();
@@ -158,6 +154,11 @@ public class ReceiveRendPacketPopup extends CenterPopupView {
redPacketTimeLayout.setVisibility(GONE);
redPacketOpen.setVisibility(VISIBLE);
}
+ ViewClicksAntiShake.clicksAntiShake(redPacketTimeLayout, () -> {
+ if (!isFans && redPacketInfoModel.getIsFans()) {
+ ToastUtil.show(getContext().getString(R.string.live_rad_pack_join_fans_group_click_tip));
+ }
+ });
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.red_packet_open), () -> {
if (isSuperJackpot) {
@@ -189,7 +190,7 @@ public class ReceiveRendPacketPopup extends CenterPopupView {
});
} else {
if (!isFans && redPacketInfoModel.getIsFans()) {
- ToastUtil.show(R.string.live_rad_pack_join_fans_group_click_tip);
+ ToastUtil.show(getContext().getString(R.string.live_rad_pack_join_fans_group_click_tip));
return;
}
if (TextUtils.equals(redPacketInfoModel.getConditions(), "1") && LiveAudienceActivity.isattention == 0) {
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 0f5bbb444..99fdba5ac 100644
--- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java
+++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java
@@ -374,7 +374,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
public SVGAImageView svga_new_user_gif, svga_new_user_double, svga_new_user_follow;
private String mAnchorName;//主播名字
private boolean isHinde = false;
- private boolean isFans=false;
+ private boolean isFans = false;
@Subscribe(threadMode = ThreadMode.MAIN)
public void onUpdata(String str) {
@@ -457,6 +457,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
}
} else if ("checkNewLetter".equals(str)) {
checkNewLetter();
+ }else if("exitFansGroup".equals(str)){
+ setFansGroup("0");
}
}
@@ -1510,7 +1512,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
if (TextUtils.equals(data.getReceiveStatus(), "0")) {
redTimeCountdown = redTimeCountdown - 1;
new XPopup.Builder(mContext)
- .asCustom(new ReceiveRendPacketPopup(mContext, redTimeCountdown, mLiveUid, mStream, redPacketModel.getRedPacketId(), data, false,isFans))
+ .asCustom(new ReceiveRendPacketPopup(mContext, redTimeCountdown, mLiveUid, mStream, redPacketModel.getRedPacketId(), data, false, isFans))
.show();
} else if (TextUtils.equals(data.getReceiveStatus(), "1")) {
new XPopup.Builder(mContext)
@@ -1547,7 +1549,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
public void setRedPacketInfoModel(RedPacketInfoModel redPacket) {
new XPopup.Builder(mContext)
- .asCustom(new ReceiveRendPacketPopup(mContext, 0, mLiveUid, mStream, redPacket.getRedPacketId(), redPacket, true,isFans))
+ .asCustom(new ReceiveRendPacketPopup(mContext, 0, mLiveUid, mStream, redPacket.getRedPacketId(), redPacket, true, isFans))
.show();
}
@@ -1798,7 +1800,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
.append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
}
if (TextUtils.equals(type, "1")) {
- ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false,1);
+ ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false, 1);
} else {
Bundle bundle = new Bundle();
bundle.putString("url", htmlUrl.toString());
@@ -1864,7 +1866,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
.append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
}
if (TextUtils.equals(type, "1")) {
- ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false,1);
+ ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false, 1);
} else {
Bundle bundle = new Bundle();
bundle.putString("url", htmlUrl.toString());
@@ -2018,10 +2020,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
} else {
url = CommonAppConfig.HOST + "/h5/activity/firstTopUp/newUp.html?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken();
}
- ZhuangBanActivity.forward(mContext, url, false,1);
+ ZhuangBanActivity.forward(mContext, url, false, 1);
} else if (link.equals("zxb")) {
String url = CommonAppConfig.HOST + "/h5/activity/weekStar/index.html?&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid;
- ZhuangBanActivity.forward(mContext, url, false,1);
+ ZhuangBanActivity.forward(mContext, url, false, 1);
} else if (link.equals("xyd")) {
openWishListWindow();
}
@@ -3475,8 +3477,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
((LiveAudienceActivity) mContext).openFansMedalOkWindow();
}
- if (!isAncher && bean.getGiftName().equals("粉絲牌")) {
+ if (!isAncher && bean.getGiftName().equals("粉絲牌") && bean.getUid().equals(CommonAppConfig.getInstance().getUid())) {
LiveAudienceActivity.is_fans = "1";
+ setFansGroup("1");
}
Log.i("tvss", bean.getDrpk_status() + "是" + mLiveUid + "vsss" + bean.getRoomnum());
if (mLiveGiftAnimPresenter == null) {
@@ -3943,7 +3946,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
}
public void setFansGroup(String isFans) {
- this.isFans=isFans.equals("1");
+ this.isFans = isFans.equals("1");
}
@@ -5277,7 +5280,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
.append("&isZh=")
.append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
if (TextUtils.equals(type, "1")) {
- ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false,1);
+ ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false, 1);
} else {
Bundle bundle = new Bundle();
bundle.putString("url", htmlUrl.toString());
@@ -5357,7 +5360,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
.append("&isZh=")
.append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
if (TextUtils.equals(type, "1")) {
- ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false,1);
+ ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false, 1);
} else {
Bundle bundle = new Bundle();
bundle.putString("url", htmlUrl.toString());
diff --git a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java
index 08fe91972..dac2cefe1 100644
--- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java
+++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java
@@ -675,6 +675,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
mLiveRoomViewHolder.showPrizePoolLevel(String.valueOf(giftPrizePoolLevel));
}
}
+ AppManager.runDebugCode(()->{
+ liveHandler.postDelayed(loadTimeoutRunnableGone, 1_000);
+ });
liveHandler.postDelayed(loadTimeoutRunnableGone, 15_000);
if (TextUtils.equals(data.getEnterRoomInfo().getIsconnection(), "1")) {
//通知心愿单位置换地方
diff --git a/live/src/main/res/layout/view_send_red_packet.xml b/live/src/main/res/layout/view_send_red_packet.xml
index afbeaea39..857692e35 100644
--- a/live/src/main/res/layout/view_send_red_packet.xml
+++ b/live/src/main/res/layout/view_send_red_packet.xml
@@ -148,7 +148,7 @@
@@ -161,31 +161,37 @@
android:text="@string/there_is_no"
android:textColor="#FDD04A"
android:textSize="13sp" />
+
+
+
+
-
-
@@ -193,7 +199,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="23dp"
- android:layout_marginTop="266dp"
+ android:layout_marginTop="286dp"
android:layout_marginEnd="29dp">