From 3aaafdbbbe1d3e8d55e49945aa360d5852913ffb Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Thu, 8 Jun 2023 10:12:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=8C=E5=96=84=E8=B5=84?= =?UTF-8?q?=E6=96=99=E5=92=8C=E7=A4=BC=E7=89=A9=E7=82=B9=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.gradle | 6 ++--- .../live/activity/LiveRyAnchorActivity.java | 27 ++++++++++++++----- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/config.gradle b/config.gradle index a3a252701..44a5734bc 100644 --- a/config.gradle +++ b/config.gradle @@ -4,14 +4,14 @@ ext { buildToolsVersion: "29.0.2", minSdkVersion : 21, targetSdkVersion : 31, - versionCode : 424, + versionCode : 428, versionName : "6.5.2" ] manifestPlaceholders = [ //正式、 -// serverHost : "https://napi.yaoulive.com", + serverHost : "https://napi.yaoulive.com", // 测试 - serverHost : "https://ceshi.yaoulive.com", +// serverHost : "https://ceshi.yaoulive.com", //腾讯地图 txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB", 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 94e131085..e6c2fcfe2 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java @@ -1467,14 +1467,29 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl @Override public void onSendGift(LiveReceiveGiftBean bean, SendBlindGiftEvent event) { - if (event!=null){ - //插入盲盒礼物消息 - bean.getLiveChatBean().setType(LiveChatBean.BLIND_BOX); - bean.getLiveChatBean().setContent(event.getGiftMsg()); - bean.getLiveChatBean().setGiftName(event.getGiftname()); - bean.getLiveChatBean().setUserNiceName(event.getUserNiceName()); + if (event != null) { + LiveChatBean liveChatBean = null; + if (!TextUtils.isEmpty(event.isBlindBoxStatus()) && TextUtils.equals(event.isBlindBoxStatus(), "true")) { + if (!TextUtils.isEmpty(event.getDressName()) && !TextUtils.isEmpty(event.getDressMsg())) { + liveChatBean = new LiveChatBean(); + liveChatBean.setUserNiceName(event.getUserNiceName()); + liveChatBean.setType(LiveChatBean.BLIND_BOX); + liveChatBean.setGiftName(event.getDressName()); + liveChatBean.setContent(event.getDressMsg()); + } + //插入盲盒礼物消息 + bean.getLiveChatBean().setType(LiveChatBean.BLIND_BOX); + bean.getLiveChatBean().setContent(event.getGiftMsg()); + bean.getLiveChatBean().setGiftName(event.getGiftname()); + bean.getLiveChatBean().setUserNiceName(event.getUserNiceName()); + } + + if (mLiveRoomViewHolder != null) { if (bean.getmLiveUId().equals(bean.getRoomnum())) { + if (liveChatBean != null) { + mLiveRoomViewHolder.insertChat(liveChatBean, 1); + } mLiveRoomViewHolder.insertChat(bean.getLiveChatBean(), 1); } mLiveRoomViewHolder.showGiftMessage(bean, false);