From b688e671c18dafe4c87d44a3965da437ebe78db3 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Fri, 28 Oct 2022 15:00:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/live/views/LiveRoomViewHolder.java | 15 ++++++++++++--- .../yunbao/live/views/PortraitLiveManager.java | 8 ++++++-- 2 files changed, 18 insertions(+), 5 deletions(-) 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 34b69b1c5..95ec42f3c 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -7,7 +7,6 @@ import static com.yunbao.live.bean.LiveChatBean.RECOMMEND_CARD_NOTIFY; import android.app.Activity; import android.app.Dialog; import android.content.Context; -import android.content.DialogInterface; import android.graphics.Outline; import android.os.Bundle; import android.os.CountDownTimer; @@ -71,7 +70,6 @@ import com.yunbao.common.bean.LiveBean; import com.yunbao.common.bean.LiveGiftBean; import com.yunbao.common.bean.LiveRoomActivityBanner; import com.yunbao.common.bean.MsgModel; -import com.yunbao.common.bean.NewPeopleInfo; import com.yunbao.common.bean.StarChallengeStatusModel; import com.yunbao.common.bean.UserBean; import com.yunbao.common.glide.ImgLoader; @@ -1094,6 +1092,15 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis msgLayout.setVisibility(View.GONE); } + public void addWishList(BannerBean bannerModel) { + mBannerList2.add(bannerModel); + if (mBanner2.isStart()) { + mBanner2.update(mBannerList2); + } else { + showBanner2(); + } + } + private synchronized void showBanner2() { if (mBannerList2 != null && mBanner2 != null) { btn_event2.setVisibility(View.VISIBLE); @@ -1186,12 +1193,14 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } else { type = bean.getShow_type(); htmlUrl.append(bean.getLink()) - .append(bean.getLink().contains("?")?"&uid=":"?uid=") + .append(bean.getLink().contains("?") ? "&uid=" : "?uid=") .append(userInfo.getId()) .append("&token=") .append(userInfo.getToken()) .append("&anchorUid=") .append(mLiveUid) + .append("&liveUid=") + .append(mLiveUid) .append("&t=") .append(System.currentTimeMillis()) .append("&g=Appapi&m=Wish&a=index"); 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 731b02615..d997314ea 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -14,7 +14,6 @@ import android.os.Handler; import android.text.TextUtils; import android.util.Log; import android.view.LayoutInflater; -import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; @@ -40,6 +39,7 @@ import com.yunbao.common.CommonAppConfig; import com.yunbao.common.CommonAppContext; import com.yunbao.common.Constants; import com.yunbao.common.bean.AiAutomaticSpeechModel; +import com.yunbao.common.bean.BannerBean; import com.yunbao.common.bean.LiveBean; import com.yunbao.common.bean.MsgModel; import com.yunbao.common.bean.StarChallengeStatusModel; @@ -279,7 +279,11 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe String json = info[0]; WishlistModel model = GsonUtils.fromJson(json, WishlistModel.class); if (mLiveRoomViewHolder != null && model != null) { -// mLiveRoomViewHolder.initWishList(model.getWishlist()); + BannerBean bannerModel = new BannerBean(); + bannerModel.setShow_type("2"); + bannerModel.setLink(CommonAppConfig.HOST + "/index.php"); + bannerModel.setImageUrl("https://downs.yaoulive.com/%E5%BF%83%E6%84%BF%E5%8D%95%E6%88%BF%E9%97%B4_%E6%82%AC%E6%B5%AE.png"); + mLiveRoomViewHolder.addWishList(bannerModel); }