Merge remote-tracking branch 'origin/master'

This commit is contained in:
zlzw 2022-11-23 15:21:54 +08:00
commit 0d18a135ec
3 changed files with 11 additions and 31 deletions

View File

@ -36,6 +36,7 @@ import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.Constants; import com.yunbao.common.Constants;
import com.yunbao.common.HtmlConfig; import com.yunbao.common.HtmlConfig;
import com.yunbao.common.activity.WebViewActivity; import com.yunbao.common.activity.WebViewActivity;
import com.yunbao.common.bean.LiveBean;
import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.http.CommonHttpConsts; import com.yunbao.common.http.CommonHttpConsts;
import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.CommonHttpUtil;
@ -50,7 +51,6 @@ import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil; import com.yunbao.common.utils.WordUtil;
import com.yunbao.live.R; import com.yunbao.live.R;
import com.yunbao.live.activity.LiveAudienceActivity; import com.yunbao.live.activity.LiveAudienceActivity;
import com.yunbao.common.bean.LiveBean;
import com.yunbao.live.bean.LiveGiftPrizePoolWinBean; import com.yunbao.live.bean.LiveGiftPrizePoolWinBean;
import com.yunbao.live.bean.LiveLuckGiftWinBean; import com.yunbao.live.bean.LiveLuckGiftWinBean;
import com.yunbao.live.bean.LiveReceiveGiftBean; import com.yunbao.live.bean.LiveReceiveGiftBean;
@ -231,13 +231,6 @@ public class LiveGiftAnimPresenter {
mFrameImageView = (FrameImageView) v.findViewById(R.id.all_frame_img); mFrameImageView = (FrameImageView) v.findViewById(R.id.all_frame_img);
// mGifGiftTipAllServer.setSelected(true);
// mGifGiftTipBuyGuard.setSelected(true);
// mGifGiftTipBuyZuoji.setSelected(true);
// mGifGiftTipBuyLiangName.setSelected(true);
// mGifGiftTipBuyVip.setSelected(true);
mIvLookClick(); mIvLookClick();
mIvLookBuyGuardClick(); mIvLookBuyGuardClick();
mIvLookBuyZuojiClick(); mIvLookBuyZuojiClick();
@ -285,11 +278,6 @@ public class LiveGiftAnimPresenter {
mAnimator.setDuration(800); mAnimator.setDuration(800);
mAnimator.setRepeatCount(3); mAnimator.setRepeatCount(3);
mAnimator.setInterpolator(new LinearInterpolator()); mAnimator.setInterpolator(new LinearInterpolator());
// mGifGiftTipAllServer.init(windowManager);
// mGifGiftTipBuyGuard.init(windowManager);
// mGifGiftTipBuyVip.init(windowManager);
} }
@ -361,10 +349,6 @@ public class LiveGiftAnimPresenter {
mGifGiftTipGroupBuyVip.setOnClickListener(new View.OnClickListener() { mGifGiftTipGroupBuyVip.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
// UserBean u = CommonAppConfig.getInstance().getUserBean();
// String url = CommonAppConfig.HOST+"/h5/Noble/index.html?nickname="+u.getUserNiceName()+"&usernobId="+u.getNoble_id()+"&token="+ CommonAppConfig.getInstance().getToken()+"&uid="+CommonAppConfig.getInstance().getUid();
// startActivity(new Intent(mContext, ZhuangBanActivity.class).putExtra("url",url));
// WebViewActivity.forward(mContext, HtmlConfig.SHOP);
changeLiveRoom(); changeLiveRoom();
} }
}); });
@ -558,7 +542,6 @@ public class LiveGiftAnimPresenter {
}); });
mDp10 = DpUtil.dp2px(10); mDp10 = DpUtil.dp2px(10);
mGifGiftTipHideAnimatorBuyVip = ObjectAnimator.ofFloat(mGifGiftTipGroupBuyVip, "translationX", 0);//平移 mGifGiftTipHideAnimatorBuyVip = ObjectAnimator.ofFloat(mGifGiftTipGroupBuyVip, "translationX", 0);//平移
// mGifGiftTipHideAnimatorBuyVip = ObjectAnimator.ofFloat(mGifGiftTipGroupBuyVip, "alpha", 1f, 0f);//渐变
mGifGiftTipHideAnimatorBuyVip.setDuration(3000); mGifGiftTipHideAnimatorBuyVip.setDuration(3000);
mGifGiftTipHideAnimatorBuyVip.setInterpolator(new AccelerateDecelerateInterpolator()); mGifGiftTipHideAnimatorBuyVip.setInterpolator(new AccelerateDecelerateInterpolator());
mGifGiftTipHideAnimatorBuyVip.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { mGifGiftTipHideAnimatorBuyVip.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@ -616,9 +599,6 @@ public class LiveGiftAnimPresenter {
diffTime = 0; diffTime = 0;
} }
mSVGAImageViewFront.clear(); mSVGAImageViewFront.clear();
// if (mHandler != null) {
// mHandler.sendEmptyMessageDelayed(WHAT_GIF_All_SERVER, diffTime);
// }
} }
@Override @Override
@ -673,7 +653,6 @@ public class LiveGiftAnimPresenter {
if (!mIsSameRoom) { if (!mIsSameRoom) {
mGifGiftTipHideAnimatorAllServer.setFloatValues(0, -mDp10 - mGifGiftTipGroupAllServer.getWidth()); mGifGiftTipHideAnimatorAllServer.setFloatValues(0, -mDp10 - mGifGiftTipGroupAllServer.getWidth());
mGifGiftTipHideAnimatorAllServer.start(); mGifGiftTipHideAnimatorAllServer.start();
// mHandler.sendEmptyMessageDelayed(WHAT_GIF_All_SERVER, 800);
} }
} else if (msg.what == WHAT_ALL_SERVER_1) { } else if (msg.what == WHAT_ALL_SERVER_1) {
mGifGiftTipHideAnimatorAllServer.setFloatValues(0, -mDp10 - mGifGiftTipGroupAllServer.getWidth()); mGifGiftTipHideAnimatorAllServer.setFloatValues(0, -mDp10 - mGifGiftTipGroupAllServer.getWidth());
@ -804,7 +783,6 @@ public class LiveGiftAnimPresenter {
//同一直播间其他玩家也能看到全服通知 //同一直播间其他玩家也能看到全服通知
String userId = CommonAppConfig.getInstance().getUid(); String userId = CommonAppConfig.getInstance().getUid();
String uid = bean.getUid(); String uid = bean.getUid();
// if (userId.equals(uid))
if (mIsAllServerNotify) { if (mIsAllServerNotify) {
if (!isAncher) { if (!isAncher) {
if (!bean.getDrpk_status().equals("1")) { if (!bean.getDrpk_status().equals("1")) {
@ -1516,9 +1494,11 @@ public class LiveGiftAnimPresenter {
public void release() { public void release() {
clearAnim(); clearAnim();
if (mLiveGiftViewHolders[0] != null) { if (mLiveGiftViewHolders[0] != null) {
mLiveGiftViewHolders[0].hideNormal();
mLiveGiftViewHolders[0].release(); mLiveGiftViewHolders[0].release();
} }
if (mLiveGiftViewHolders[1] != null) { if (mLiveGiftViewHolders[1] != null) {
mLiveGiftViewHolders[1].hideNormal();
mLiveGiftViewHolders[1].release(); mLiveGiftViewHolders[1].release();
} }
if (mSVGAImageView != null) { if (mSVGAImageView != null) {

View File

@ -91,7 +91,6 @@ import com.yunbao.common.utils.SVGAViewUtils;
import com.yunbao.common.utils.ScreenDimenUtil; import com.yunbao.common.utils.ScreenDimenUtil;
import com.yunbao.common.utils.SpUtil; import com.yunbao.common.utils.SpUtil;
import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil; import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.utils.formatBigNum; import com.yunbao.common.utils.formatBigNum;
import com.yunbao.common.views.AbsViewHolder; import com.yunbao.common.views.AbsViewHolder;
@ -2681,11 +2680,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
* @param bean * @param bean
*/ */
public void showBuyVipMessage(LiveReceiveGiftBean bean) { public void showBuyVipMessage(LiveReceiveGiftBean bean) {
// if (mLiveGiftAnimPresenter == null) {
// mLiveGiftAnimPresenter = new LiveGiftAnimPresenter(mContext, mContentView, mGifImageView, mSVGAImageView, mLiveGiftPrizePoolContainer, windowManager);
// }
// mLiveGiftAnimPresenter.showBuyVipGiftAnim(bean);
switch (bean.getNobilityid()) { switch (bean.getNobilityid()) {
case "1": case "1":
noble.setRootView(bean.getUhead(), noble.setRootView(bean.getUhead(),
@ -2929,6 +2923,12 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
mUserRecyclerView.setLayoutParams(params); mUserRecyclerView.setLayoutParams(params);
} }
public void releaseGift() {
if (mLiveGiftAnimPresenter != null) {
mLiveGiftAnimPresenter.cancelAllAnim();
}
}
public void release() { public void release() {
EventBus.getDefault().unregister(this); EventBus.getDefault().unregister(this);
LiveHttpUtil.cancel(LiveHttpConsts.GET_USER_LIST); LiveHttpUtil.cancel(LiveHttpConsts.GET_USER_LIST);

View File

@ -277,7 +277,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
mLiveRoomViewHolder.setTitle(data.getTitle()); mLiveRoomViewHolder.setTitle(data.getTitle());
mLiveRoomViewHolder.setAnchorGoodNumber(data.getGoodNum()); mLiveRoomViewHolder.setAnchorGoodNumber(data.getGoodNum());
mLiveRoomViewHolder.clearGuardIcon(); mLiveRoomViewHolder.clearGuardIcon();
mLiveRoomViewHolder.releaseGift();
mLiveRyLinkMicPkPresenter.setLiveUid(data.getUid(), ""); mLiveRyLinkMicPkPresenter.setLiveUid(data.getUid(), "");
mLiveRoomViewHolder.setLiveUid(data.getUid()); mLiveRoomViewHolder.setLiveUid(data.getUid());