From bbf5d159b4e297bb72b8d81796b1e2f0af5cfef7 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Sun, 7 Apr 2024 14:15:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E6=B5=8B=E4=BF=AE=E5=A4=8D=EF=BC=8C?= =?UTF-8?q?=E5=85=A8=E6=9C=8D=E6=B7=BB=E5=8A=A0=E4=B8=BB=E6=92=AD=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../live/activity/LiveRyAnchorActivity.java | 7 ++++++ .../yunbao/live/bean/LiveReceiveGiftBean.java | 10 ++++++++ .../live/presenter/LiveGiftAnimPresenter.java | 24 ++++++++++++------- .../yunbao/live/views/LiveRoomViewHolder.java | 4 ++-- .../live/views/PortraitLiveManager.java | 2 +- main/src/main/res/layout/view_main_home.xml | 10 +++++--- 6 files changed, 43 insertions(+), 14 deletions(-) diff --git a/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java index e1445f947..d1ed67746 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java @@ -51,6 +51,7 @@ import com.yunbao.common.bean.MicUserBean; import com.yunbao.common.bean.SendMoneyLongModel; import com.yunbao.common.bean.UserBean; import com.yunbao.common.dialog.NotCancelableDialog; +import com.yunbao.common.event.AllServerNotifyFFGGGDJANEvent; import com.yunbao.common.event.GiftWallIlluminateEvent; import com.yunbao.common.event.LiveSudGamePopupShowOrHideEvent; import com.yunbao.common.event.LoginInvalidEvent; @@ -1923,4 +1924,10 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl } + @Subscribe(threadMode = ThreadMode.MAIN) + public void onAllServerNotifyFFGGGDJANEvent(AllServerNotifyFFGGGDJANEvent event) { + if (mLiveRoomViewHolder != null) { + mLiveRoomViewHolder.showAllServerNotifyFFGGGD(event,false); + } + } } diff --git a/live/src/main/java/com/yunbao/live/bean/LiveReceiveGiftBean.java b/live/src/main/java/com/yunbao/live/bean/LiveReceiveGiftBean.java index 092b99d30..e35fb773f 100644 --- a/live/src/main/java/com/yunbao/live/bean/LiveReceiveGiftBean.java +++ b/live/src/main/java/com/yunbao/live/bean/LiveReceiveGiftBean.java @@ -68,6 +68,16 @@ public class LiveReceiveGiftBean extends BaseModel { private String msg_en; private String guard_type; private AllServerNotifyFFGGGDJANEvent notifyFFGGGDJANEvent; + private boolean showB; + + public boolean isShowB() { + return showB; + } + + public LiveReceiveGiftBean setShowB(boolean showB) { + this.showB = showB; + return this; + } public AllServerNotifyFFGGGDJANEvent getNotifyFFGGGDJANEvent() { return notifyFFGGGDJANEvent; diff --git a/live/src/main/java/com/yunbao/live/presenter/LiveGiftAnimPresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveGiftAnimPresenter.java index db6f89c4f..b73e45d18 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveGiftAnimPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveGiftAnimPresenter.java @@ -39,6 +39,7 @@ import com.opensource.svgaplayer.SVGAImageView; import com.opensource.svgaplayer.SVGAParser; import com.opensource.svgaplayer.SVGAVideoEntity; import com.opensource.svgaplayer.utils.SVGARect; +import com.umeng.analytics.MobclickAgent; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.Constants; import com.yunbao.common.HtmlConfig; @@ -905,7 +906,7 @@ public class LiveGiftAnimPresenter { } else if (action == 90) { showBuyGuardGiftAnimNew(notifyGuardEvent); } else if (action == 91) { - showAllServerNotifyFFGGGD(bean.getNotifyFFGGGDJANEvent()); + showAllServerNotifyFFGGGD(bean.getNotifyFFGGGDJANEvent(), bean.isShowB()); } } @@ -1099,7 +1100,7 @@ public class LiveGiftAnimPresenter { View iv_look_full_service_notice_new3; ImageView iv_look_full_service_notice_new2; - public void showAllServerNotifyFFGGGD(AllServerNotifyFFGGGDJANEvent event) { + public void showAllServerNotifyFFGGGD(AllServerNotifyFFGGGDJANEvent event, boolean showB) { if (TextUtils.isEmpty(event.getBackgroundImage())) return; @@ -1109,6 +1110,7 @@ public class LiveGiftAnimPresenter { LiveReceiveGiftBean bean = new LiveReceiveGiftBean(); bean.setSendtype(91); bean.setNotifyFFGGGDJANEvent(event); + bean.setShowB(showB); mGifAll.offer(bean); } } else { @@ -1135,6 +1137,16 @@ public class LiveGiftAnimPresenter { int unameSize = textMsg.length(); builder.setSpan(new ForegroundColorSpan(Color.parseColor(dto.getColour())), unameIndexOf, unameIndexOf + unameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); } + if (!showB){ + iv_look_full_service_notice_new3.setVisibility(View.GONE); + }else { + if (TextUtils.equals(event.getJumpType(),"0")){ + iv_look_full_service_notice_new3.setVisibility(View.GONE); + }else { + iv_look_full_service_notice_new3.setVisibility(View.VISIBLE); + } + } + if (!TextUtils.isEmpty(event.getButtonImage())) { ImgLoader.display(mContext, event.getButtonImage(), iv_look_full_service_notice_new2); @@ -1152,9 +1164,6 @@ public class LiveGiftAnimPresenter { iv_look_full_service_notice_new.setText(buttonString); } iv_look_full_service_notice_new.setText(stringBuilder); - } else { - iv_look_full_service_notice_new3.setVisibility(View.GONE); - iv_look_full_service_notice_new3.setVisibility(View.VISIBLE); } full_service_notice_new_text.postDelayed(new Runnable() { @Override @@ -1263,6 +1272,7 @@ public class LiveGiftAnimPresenter { ViewClicksAntiShake.clicksAntiShake(iv_look_full_service_notice_new, new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { + MobclickAgent.onEvent(mContext, "new_full_server", "全服的埋点"); String jumpType = notifyFFGGGDJANEvent.getJumpType(); if (TextUtils.equals(jumpType, "1")) { changeLiveRoom(); @@ -1270,9 +1280,7 @@ public class LiveGiftAnimPresenter { IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo(); if (!TextUtils.isEmpty(notifyFFGGGDJANEvent.getLink())) { StringBuffer htmlUrl = new StringBuffer(); - htmlUrl.append(CommonAppConfig.HOST) - .append("/") - .append(notifyFFGGGDJANEvent.getLink()) + htmlUrl.append(notifyFFGGGDJANEvent.getLink()) .append(notifyFFGGGDJANEvent.getLink().contains("?") ? "&uid=" : "?uid=") .append(userInfo.getId()) .append("&token=") 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 59f1145ba..a5f9a9fe2 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -3972,12 +3972,12 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } - public void showAllServerNotifyFFGGGD(AllServerNotifyFFGGGDJANEvent notifyFFGGGDJANEvent) { + public void showAllServerNotifyFFGGGD(AllServerNotifyFFGGGDJANEvent notifyFFGGGDJANEvent,boolean showB) { if (mLiveGiftAnimPresenter == null) { mLiveGiftAnimPresenter = new LiveGiftAnimPresenter(mContext, mContentView, mGifImageView, mSVGAImageView, mLiveGiftPrizePoolContainer, windowManager); } mLiveGiftAnimPresenter.setLiveUidStream(mLiveUid, mStream); - mLiveGiftAnimPresenter.showAllServerNotifyFFGGGD(notifyFFGGGDJANEvent); + mLiveGiftAnimPresenter.showAllServerNotifyFFGGGD(notifyFFGGGDJANEvent,showB); } //全服通知 购买坐骑 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 86abc7a4e..801bab514 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -1312,7 +1312,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe public void showAllServerNotifyFFGGGD(AllServerNotifyFFGGGDJANEvent notifyFFGGGDJANEvent) { if (mLiveRoomViewHolder != null) { - mLiveRoomViewHolder.showAllServerNotifyFFGGGD(notifyFFGGGDJANEvent); + mLiveRoomViewHolder.showAllServerNotifyFFGGGD(notifyFFGGGDJANEvent,true); } } diff --git a/main/src/main/res/layout/view_main_home.xml b/main/src/main/res/layout/view_main_home.xml index bf1aad4c3..1e99b6ebd 100644 --- a/main/src/main/res/layout/view_main_home.xml +++ b/main/src/main/res/layout/view_main_home.xml @@ -25,6 +25,7 @@ + android:layout_height="match_parent" + android:orientation="horizontal"> @@ -56,6 +59,7 @@