diff --git a/common/src/main/res/layout/activity_webview.xml b/common/src/main/res/layout/activity_webview.xml index 0f10ea7e6..ec83eebe4 100644 --- a/common/src/main/res/layout/activity_webview.xml +++ b/common/src/main/res/layout/activity_webview.xml @@ -67,5 +67,6 @@ \ No newline at end of file diff --git a/config.gradle b/config.gradle index 4e4609879..208b5def5 100644 --- a/config.gradle +++ b/config.gradle @@ -4,7 +4,7 @@ ext { buildToolsVersion: "29.0.2", minSdkVersion : 21, targetSdkVersion : 31, - versionCode : 423, + versionCode : 428, versionName : "6.5.2" ] manifestPlaceholders = [ @@ -26,7 +26,7 @@ ext { // true表示谷歌支付 false isGooglePlay : false, //是否上报异常日志 - isUploadLog : false + isUploadLog : true ] } //7664 1 \ No newline at end of file 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 16e6029e9..1bbc86181 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java @@ -861,8 +861,7 @@ public class LiveAudienceActivity extends LiveActivity { if (TextUtils.equals(htmlUrl, "recharge")) { RouteUtil.forwardMyCoin(mContext); } else if (TextUtils.equals(htmlUrl, "to_me_information")) { - onBackPressed(); - Constants.isShowPage = 3; + RouteUtil.forwardEditProfileActivity(); } else { if (!screen) { ZhuangBanActivity.forward(mContext, htmlUrl, false); 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); diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveGiftDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveGiftDialogFragment.java index 72e2b8901..7b06cd904 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveGiftDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveGiftDialogFragment.java @@ -154,7 +154,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On DialogInterface.OnDismissListener onDismissListener; DialogInterface.OnShowListener onShowListener; private SVGAImageView blindSvga, blindBoxOpen; - + private View close_view; @Override protected int getLayoutId() { return R.layout.dialog_live_gift_wrap; @@ -316,6 +316,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On description = mRootView.findViewById(R.id.description); mVipGoldTitle = mRootView.findViewById(R.id.vipGoldTitle); mVipGoldDesc = mRootView.findViewById(R.id.vipGoldDesc); + close_view = mRootView.findViewById(R.id.close_view); mVipGold.setOnClickListener(this); mGiftPackage = mRootView.findViewById(R.id.btn_gift_package); blindNumber = mRootView.findViewById(R.id.blind_number); @@ -323,6 +324,12 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On textBlindGiftName = mRootView.findViewById(R.id.text_blind_gift_name); mGiftPackage.setOnClickListener(this); mRootView.findViewById(R.id.live_gift_download_all).setOnClickListener(this); + close_view.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + dismiss(); + } + }); mHandler = new Handler() { @Override public void handleMessage(Message msg) { @@ -1258,3 +1265,4 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On }; } + 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 9cabe9fed..f0e3bfa81 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveGiftAnimPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveGiftAnimPresenter.java @@ -335,7 +335,7 @@ public class LiveGiftAnimPresenter { public void onClick(View view) { //切换直播间 - if (TextUtils.equals(mIvLook.getText().toString(),mContext.getString(R.string.participate_in))) { + if (TextUtils.equals(mIvLook.getText().toString(), mContext.getString(R.string.participate_in))) { new Handler().postDelayed(new Runnable() { @Override public void run() { @@ -882,6 +882,10 @@ public class LiveGiftAnimPresenter { params.topMargin = DpUtil.dp2px(y); mGifGiftTipGroupAllServer.setLayoutParams(params); } + bgAllServer.setBackgroundResource(R.drawable.bg_live_gift_tip); + mIvLook.setBackgroundResource(R.drawable.bg_all_server_icon); + superNotice.setBackgroundResource(R.mipmap.super_notice); + mIvLook.setText(R.string.live_onlookers); mAncherName = mTempGifGiftBean.getAncherName(); mGifGiftTipAllServer.setSelected(false); mGifGiftTipGroupAllServer.setAlpha(1f); 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 7b8e9beee..9117747d5 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -341,7 +341,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis private TextView mPkRankText; private ImageView mPkRankTopIcon; private TextView mRedVal, mBlueVal; - private String pkUid = ""; + public String pkUid = ""; //接口整合新加参数 private GuardUserModel guardUserModel; @@ -1486,7 +1486,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis msgLayout.setVisibility(View.VISIBLE); } AppManager.runDebugCode(() -> msgLayout.setVisibility(View.GONE)); - voteManager.hide(); if (d_pk_view != null) { d_pk_view.setVisibility(View.GONE); } @@ -1507,6 +1506,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis public void resetView() { resetViewGone(); visibility = false; + pkUidTmp = ""; mBannerList1.clear(); mBannerList2.clear(); mBannerList3.clear(); @@ -2092,7 +2092,19 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis initPkRank(null); } + private String pkUidTmp = ""; + public void initPkRank(String isLadders) { + //PK状态下,pkuid不能为空 + if (pkUidTmp.equals(pkUid) && !StringUtil.isEmpty(pkUid)) { + return; + } + //非PK状态下,第一次调用通过 + if (pkRankLayout.getTag() != null && pkRankLayout.getTag().equals(mLiveUid) && StringUtil.isEmpty(pkUid)) { + return; + } + pkRankLayout.setTag(mLiveUid); + pkUidTmp = pkUid; pkRankLayout.setVisibility(View.GONE); new LoadDian9TuUtil().loadDian9TuAssets2(mContext, liveRankPk2, "rectangle_new.png", 1); mRedVal.setVisibility(View.GONE); @@ -2138,6 +2150,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis liveRankPk2.setVisibility(View.VISIBLE); mPkRankText.setText(bean.getName()); ImgLoader.display(mContext, bean.getImg(), mPkRankIcon); + pkUidTmp = ""; if (StringUtil.isEmpty(bean.getPkTopImgUrl())) { return; } @@ -2160,6 +2173,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis @Override public void onError(String error) { ToastUtil.show(R.string.net_error); + pkUidTmp = ""; } }); @@ -2478,9 +2492,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis */ public void setRoomNum(String roomNum) { if (mID != null) { - if (roomNum.contains("ID")){ + if (roomNum.contains("ID")) { mID.setText(roomNum); - }else { + } else { mID.setText(String.format("ID:%s", roomNum)); } @@ -3684,9 +3698,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis if (!StringUtil.isEmpty(goodNumber) && !goodNumber.equals("0")) { mAnchorLayout.setBackgroundResource(R.drawable.bg_live_anchor_goodnum); - if (goodNumber.contains("ID")){ + if (goodNumber.contains("ID")) { mID.setText(goodNumber); - }else { + } else { mID.setText(String.format("ID:%s", goodNumber)); } mGoodNumberIcon.setVisibility(View.VISIBLE); @@ -4650,6 +4664,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis mHandler.removeMessages(WHAT_PK_TIME); } isShowGif = false; + if (voteManager != null) { + voteManager.hide(); + } } /** 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 13d5fe08b..2c7b5fd27 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -594,6 +594,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe } else if (!pkInfo.getString("end_pk_time").equals("0")) { if (mLiveRoomViewHolder != null) { mLiveRoomViewHolder.pkHandler = true; + mLiveRoomViewHolder.pkUid=pkUid; mLiveRoomViewHolder.initPkRank(null); } if (mLivePlayViewHolder != null) { diff --git a/live/src/main/res/layout/dialog_live_gift_wrap.xml b/live/src/main/res/layout/dialog_live_gift_wrap.xml index fa39f0cff..36ce0ea3e 100644 --- a/live/src/main/res/layout/dialog_live_gift_wrap.xml +++ b/live/src/main/res/layout/dialog_live_gift_wrap.xml @@ -6,6 +6,7 @@ android:orientation="vertical">