fix:去掉播放礼物特效的一些判断(价值大于520、特效标识),改为是否有特效

This commit is contained in:
max
2024-05-14 15:30:00 +08:00
parent e386c0cf58
commit 01093d39c5
2 changed files with 15 additions and 2 deletions

View File

@@ -275,7 +275,7 @@ public class GiftV2View extends FrameLayout implements GiftEffectView.GiftEffect
} }
GiftReceiveInfo giftReceiveInfo = giftReceiveInfos.get(0); GiftReceiveInfo giftReceiveInfo = giftReceiveInfos.get(0);
GiftInfo giftInfo = giftReceiveInfo.getGift(); GiftInfo giftInfo = giftReceiveInfo.getGift();
if (totalCoin >= 520 || (giftInfo != null && giftInfo.isHasEffect())) { if (giftInfo != null && giftInfo.isEffectGift()) {
Message msg = Message.obtain(); Message msg = Message.obtain();
msg.what = 0; msg.what = 0;
GiftEffectInfo giftEffectInfo = new GiftEffectInfo(); GiftEffectInfo giftEffectInfo = new GiftEffectInfo();
@@ -364,7 +364,7 @@ public class GiftV2View extends FrameLayout implements GiftEffectView.GiftEffect
targetUsers.add(giftReceiver); targetUsers.add(giftReceiver);
if (!isShowAnimation) return; if (!isShowAnimation) return;
giftInfo = giftReceiveInfo.getDisplayGift().get(pos); giftInfo = giftReceiveInfo.getDisplayGift().get(pos);
if (giftInfo != null && giftInfo.isHasEffect()) { if (giftInfo != null && giftInfo.isEffectGift()) {
Message msg = Message.obtain(); Message msg = Message.obtain();
msg.what = 0; msg.what = 0;
GiftEffectInfo giftEffectInfo = new GiftEffectInfo(); GiftEffectInfo giftEffectInfo = new GiftEffectInfo();

View File

@@ -1,8 +1,12 @@
package com.chwl.core.gift.bean; package com.chwl.core.gift.bean;
import android.text.TextUtils;
import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.SerializedName;
import com.netease.nim.uikit.common.util.string.StringUtil;
import java.io.Serializable; import java.io.Serializable;
import java.net.MalformedURLException;
import lombok.Data; import lombok.Data;
@@ -111,4 +115,13 @@ public class GiftInfo implements Serializable {
mFreeGiftProgress = freeGiftProgress; mFreeGiftProgress = freeGiftProgress;
} }
public boolean isEffectGift() {
if (getOtherViewType() == 1 && !TextUtils.isEmpty(getViewUrl())) {
return true;
} else if (isHasVggPic() && !StringUtil.isEmpty(getVggUrl())) {
return true;
}
return false;
}
} }