Merge branch 'v2.1.1/fix' into v2.2.0/test_old_fix

This commit is contained in:
Max
2023-11-01 18:34:23 +08:00

View File

@@ -296,16 +296,24 @@ public class GiftV2View extends FrameLayout implements GiftEffectView.GiftEffect
if (roomInfo != null) {
List<GiftReceiver> targetUsers = new ArrayList<>();
int totalCoin = 0;
drawLuckyGiftAnimation(roomInfo, giftReceiveInfos, totalCoin, targetUsers, giftReceiveType, isShowAnimation, pos);
// if (AvRoomDataManager.get().mIsNeedGiftEffect &&
// !AvRoomDataManager.get().isSelfGamePlaying()) {
// SVGAImageView imageView = playLuckyBagAnim(svgaUrl);
// handler.postDelayed(() -> {
// removeView(imageView);
// imageView.stopAnimation(true);
// }, 1800);
// }
// handler.postDelayed(() -> drawLuckyGiftAnimation(roomInfo, giftReceiveInfos, totalCoin, targetUsers, giftReceiveType, isShowAnimation, pos), 1200);
boolean isPlaySvga = false;
if (AvRoomDataManager.get().mIsNeedGiftEffect &&
!AvRoomDataManager.get().isSelfGamePlaying()) {
if (svgaUrl != null && !svgaUrl.isEmpty()) {
isPlaySvga = true;
SVGAImageView imageView = playLuckyBagAnim(svgaUrl);
handler.postDelayed(() -> {
removeView(imageView);
imageView.stopAnimation(true);
}, 1800);
}
}
if (isPlaySvga) {
handler.postDelayed(() -> drawLuckyGiftAnimation(roomInfo, giftReceiveInfos, totalCoin, targetUsers, giftReceiveType, isShowAnimation, pos), 1200);
} else {
drawLuckyGiftAnimation(roomInfo, giftReceiveInfos, totalCoin, targetUsers, giftReceiveType, isShowAnimation, pos);
}
}
}
@@ -353,7 +361,7 @@ public class GiftV2View extends FrameLayout implements GiftEffectView.GiftEffect
targetUsers.add(giftReceiver);
if (!isShowAnimation) return;
giftInfo = giftReceiveInfo.getDisplayGift().get(pos);
if (totalCoin >= 520 || (giftInfo != null && giftInfo.isHasEffect())) {
if (giftInfo != null && giftInfo.isHasEffect()) {
Message msg = Message.obtain();
msg.what = 0;
GiftEffectInfo giftEffectInfo = new GiftEffectInfo();