fix:修复幸运礼物重复动效(去掉本地自己播的一个svga)

This commit is contained in:
Max
2023-11-01 11:34:43 +08:00
parent a211267517
commit b63b4ba07a

View File

@@ -296,17 +296,16 @@ public class GiftV2View extends FrameLayout implements GiftEffectView.GiftEffect
if (roomInfo != null) { if (roomInfo != null) {
List<GiftReceiver> targetUsers = new ArrayList<>(); List<GiftReceiver> targetUsers = new ArrayList<>();
int totalCoin = 0; int totalCoin = 0;
drawLuckyGiftAnimation(roomInfo, giftReceiveInfos, totalCoin, targetUsers, giftReceiveType, isShowAnimation, pos);
if (AvRoomDataManager.get().mIsNeedGiftEffect && // if (AvRoomDataManager.get().mIsNeedGiftEffect &&
!AvRoomDataManager.get().isSelfGamePlaying()) { // !AvRoomDataManager.get().isSelfGamePlaying()) {
SVGAImageView imageView = playLuckyBagAnim(svgaUrl); // SVGAImageView imageView = playLuckyBagAnim(svgaUrl);
handler.postDelayed(() -> { // handler.postDelayed(() -> {
removeView(imageView); // removeView(imageView);
imageView.stopAnimation(true); // imageView.stopAnimation(true);
}, 1800); // }, 1800);
} // }
// handler.postDelayed(() -> drawLuckyGiftAnimation(roomInfo, giftReceiveInfos, totalCoin, targetUsers, giftReceiveType, isShowAnimation, pos), 1200);
handler.postDelayed(() -> drawLuckyGiftAnimation(roomInfo, giftReceiveInfos, totalCoin, targetUsers, giftReceiveType, isShowAnimation, pos), 1200);
} }
} }