try to fix send gift animation problems
This commit is contained in:
@@ -310,18 +310,8 @@ PIUniversalBannerViewDelegate>
|
||||
if (attachment.second == Custom_Message_Sub_Gift_EmbeddedStyle) {
|
||||
if (receiveInfo.giftVo) {
|
||||
receiveInfo.gift = receiveInfo.giftVo;
|
||||
// receiveInfo.targetUid = receiveInfo.recvUserUid;
|
||||
// receiveInfo.targetNick = receiveInfo.recvUserNick;
|
||||
// receiveInfo.targetUids = @[receiveInfo.recvUserUid];
|
||||
// if (<#condition#>) {
|
||||
// <#statements#>
|
||||
// }
|
||||
// [data setObject:[[obj objectForKey:@"uid"] stringValue] forKey:@"targetUid"];
|
||||
// [data setObject:[obj objectForKey:@"nick"] forKey:@"targetNick"];
|
||||
// [data setObject:[obj objectForKey:@"avatar"] forKey:@"targetAvatar"];
|
||||
}
|
||||
|
||||
// TODO: 只送一个人时背包礼物有问题
|
||||
receiveInfo.targetUid = [[attachment.data objectForKey:@"recvUserUid"] stringValue];
|
||||
receiveInfo.targetNick = [attachment.data objectForKey:@"recvUserNick"];
|
||||
receiveInfo.targetAvatar = [attachment.data objectForKey:@"recvUserAvatar"];
|
||||
@@ -1751,6 +1741,20 @@ PIUniversalBannerViewDelegate>
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
for (NSInteger i=0;i<15;i++) {
|
||||
endPoint = [self.delegate animationPointAtStageViewByIndex:i];
|
||||
BOOL isCombing = [[GiftComboManager sharedManager] isGiftCombing] && [sendUid isEqualToString:[AccountInfoStorage instance].getUid];
|
||||
CGFloat time = isCombing ? 0.25 : 0.5;
|
||||
dispatch_time_t timer = dispatch_time(DISPATCH_TIME_NOW, time * NSEC_PER_SEC);
|
||||
dispatch_after(timer, dispatch_get_main_queue(), ^{
|
||||
[self beginGiftAnimation:giftInfo.giftUrl
|
||||
startPoint:starPoint
|
||||
endPoint:endPoint
|
||||
isGiftCombing:isCombing];
|
||||
});
|
||||
}
|
||||
#else
|
||||
for (NSString *targetUid in targetUids) {
|
||||
NSString * userId = targetUid;
|
||||
if ([userId isKindOfClass:[NSNumber class]]) {
|
||||
@@ -1759,19 +1763,21 @@ PIUniversalBannerViewDelegate>
|
||||
endPoint = [self getGiftAnimationPoint:userId isEnd:YES];
|
||||
dispatch_time_t timer = dispatch_time(DISPATCH_TIME_NOW, 0.5 * NSEC_PER_SEC);
|
||||
|
||||
BOOL isCombing = [[GiftComboManager sharedManager] isGiftCombing] &&
|
||||
[sendUid isEqualToString:[AccountInfoStorage instance].getUid];
|
||||
BOOL isCombing = [[GiftComboManager sharedManager] isGiftCombing] && [sendUid isEqualToString:[AccountInfoStorage instance].getUid];
|
||||
|
||||
if (isCombing) {
|
||||
timer = dispatch_time(DISPATCH_TIME_NOW, 0.25 * NSEC_PER_SEC);
|
||||
}
|
||||
dispatch_after(timer, dispatch_get_main_queue(), ^{
|
||||
[self beginGiftAnimation:giftInfo.giftUrl
|
||||
[self beginGiftAnimation:giftInfo.giftUrl
|
||||
startPoint:starPoint
|
||||
endPoint:endPoint
|
||||
endPoint:endPoint
|
||||
isGiftCombing:isCombing];
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
|
||||
///起点
|
||||
|
Reference in New Issue
Block a user