优化 mic 位头像逻辑

调整错误的代码单词
This commit is contained in:
eggmanQQQ
2024-07-19 14:59:36 +08:00
parent f717711852
commit 614d431b2c
23 changed files with 61 additions and 83 deletions

View File

@@ -462,7 +462,7 @@
moveAnimation.duration = 0.5;
moveAnimation.repeatCount = 1;
moveAnimation.removedOnCompletion = YES;
// @kWeakify(self);
[moveAnimation setCompletionBlock:^(POPAnimation *anim, BOOL finished) {
@kStrongify(self);
if (finished) {
@@ -540,12 +540,6 @@
if(self.animationListB.count > 0){
[self.animationListB removeObjectAtIndex:0];
}
// if(self. isAnimationListAFinish == YES){
//
// [self playAnimationWithModel];
// self.isAnimationListAFinish = NO;
// return;
// }
[self playAnimationWithModel];
}
}];
@@ -609,12 +603,6 @@
if (self.animationListB.count > 0) {
[self.animationListB removeObjectAtIndex:0];
}
// if(self. isAnimationListAFinish == YES){
//
// [self playAnimationWithModel];
// self.isAnimationListAFinish = NO;
// return;
// }
[self playAnimationWithModel];
}
}];
@@ -1717,7 +1705,7 @@
PIBaseAnimationViewModel * prizeModel = [PIBaseAnimationViewModel modelWithDictionary:attachment.data];
prizeModel.type = GiftBannerType_Lucky;
prizeModel.isInRoomVisiable = attachment.second == Custom_Message_Sub_Room_Gift_LuckBag;
prizeModel.isInRoomVisable = attachment.second == Custom_Message_Sub_Room_Gift_LuckBag;
if(self.animationListB.count == 0 && self.isPlayOfB == NO){
[self createBigPrizeAnimation:prizeModel];
@@ -1814,7 +1802,9 @@
}
return;
}
if(self.isPlayOfB == YES)return;
PIBaseAnimationViewModel *model = self.animationListB.firstObject;
if(model.type == GiftBannerType_Lucky){
[self createBigPrizeAnimation:model];
@@ -1854,7 +1844,7 @@
[kWindow addSubview:broadcastView];
return;
}
if (!giftInfo.isInRoomVisiable && giftInfo.roomUid.length > 0 && giftInfo.roomUid.integerValue != self.delegate.getRoomInfo.uid) {
if (!giftInfo.isInRoomVisable && giftInfo.roomUid.length > 0 && giftInfo.roomUid.integerValue != self.delegate.getRoomInfo.uid) {
[self.delegate exitRoom];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[XPRoomViewController openRoom:giftInfo.roomUid viewController:[XCCurrentVCStackManager shareManager].getCurrentVC];
@@ -1868,13 +1858,13 @@
if ([self isInSudGame]) {return;}
if(receiveInfo.isHomeShow == YES)return;
///CPU
RoomInfoModel * roomInfor = [self.delegate getRoomInfo];
RoomInfoModel * roomInfo = [self.delegate getRoomInfo];
if (receiveInfo.isLuckyBagGift) {
if (receiveInfo.isShowAnimation) {
// SVGA
if (receiveInfo.displayGift.count > 0) {
[receiveInfo.displayGift enumerateObjectsUsingBlock:^(GiftInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
if ((obj.otherViewType == GiftOtherViewTypeMp4 || obj.otherViewType == GiftOtherViewTypePag) && obj.viewUrl && obj.viewUrl.length > 0 && roomInfor.hasAnimationEffect) {
if ((obj.otherViewType == GiftOtherViewTypeMp4 || obj.otherViewType == GiftOtherViewTypePag) && obj.viewUrl && obj.viewUrl.length > 0 && roomInfo.hasAnimationEffect) {
GiftReceiveInfoModel * model = [[GiftReceiveInfoModel alloc] init];
model.viewUrl = obj.viewUrl;
model.avatar = receiveInfo.sendUserAvatar;
@@ -1886,9 +1876,7 @@
model.targetAvatar = receiveInfo.targetAvatar;
model.targetNick = receiveInfo.targetNick;
[self.svgaQueue addObject:model];
// [self.animationListA addObject:model];
} else if (obj.hasVggPic && roomInfor.hasAnimationEffect) {
} else if (obj.hasVggPic && roomInfo.hasAnimationEffect) {
GiftReceiveInfoModel * model = [[GiftReceiveInfoModel alloc] init];
model.viewUrl = obj.viewUrl;
model.avatar = receiveInfo.sendUserAvatar;
@@ -1900,8 +1888,6 @@
model.targetAvatar = receiveInfo.targetAvatar;
model.targetNick = receiveInfo.targetNick;
[self.svgaQueue addObject:model];
// [self.animationListA addObject:model];
}
}];
}
@@ -1926,11 +1912,11 @@
giftTotal = receiveInfo.giftNum * giftInfo.goldPrice;
}
if ((giftInfo.otherViewType == GiftOtherViewTypeMp4 || giftInfo.otherViewType == GiftOtherViewTypePag) && giftInfo.viewUrl.length > 0 && roomInfor.hasAnimationEffect) {
if ((giftInfo.otherViewType == GiftOtherViewTypeMp4 || giftInfo.otherViewType == GiftOtherViewTypePag) && giftInfo.viewUrl.length > 0 && roomInfo.hasAnimationEffect) {
receiveInfo.viewUrl = giftInfo.viewUrl;
// [self.animationListA addObject:receiveInfo];
[self.svgaQueue addObject:receiveInfo];
} else if (giftInfo.hasVggPic && giftInfo.vggUrl.length > 0 && roomInfor.hasAnimationEffect) {///SVGA
} else if (giftInfo.hasVggPic && giftInfo.vggUrl.length > 0 && roomInfo.hasAnimationEffect) {///SVGA
receiveInfo.vggUrl = giftInfo.vggUrl;
// [self.animationListA addObject:receiveInfo];
[self.svgaQueue addObject:receiveInfo];
@@ -2041,7 +2027,7 @@
if ([[NSFileManager defaultManager] fileExistsAtPath:fullPath]){
NSData *data = [NSData dataWithContentsOfFile:fullPath options:0 error:NULL];
@kWeakify(self);
[self.parser parseWithData:data cacheKey:nil completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
[self.parser parseWithData:data cacheKey:@"" completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
@kStrongify(self);
if (videoItem != nil) {
self.giftEffectView.hidden = NO;