修复bug

This commit is contained in:
liyuhua
2023-08-30 16:50:10 +08:00
parent b8196c5e49
commit fbc75cabb5
2 changed files with 32 additions and 13 deletions

View File

@@ -31,7 +31,7 @@
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Release"
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"

View File

@@ -1650,16 +1650,7 @@
[self playGiftEffect:giftInfo.vggUrl];
}
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(6 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
if (self.isLargeGiftAnimating == YES) {
self.isLargeGiftAnimating = NO;
}
if(self.svgaQueue.count > 0){
[self.svgaQueue removeObjectAtIndex:0];
}
if(self.svgaQueue.count > 0 && self.isLargeGiftAnimating == NO){
[self createGiftSvgaAnimation:self.svgaQueue.firstObject];
}
});
}
@@ -2045,7 +2036,16 @@
- (void)svgaPlayerDidFinishedAnimation:(SVGAPlayer *)player {
if (player == self.giftEffectView) {
self.giftEffectView.hidden = YES;
if (self.isLargeGiftAnimating == YES) {
self.isLargeGiftAnimating = NO;
}
if(self.svgaQueue.count > 0){
[self.svgaQueue removeObjectAtIndex:0];
}
if(self.svgaQueue.count > 0 && self.isLargeGiftAnimating == NO){
[self createGiftSvgaAnimation:self.svgaQueue.firstObject];
}
} else if (player == self.luckyGiftEffectView) {
self.luckyGiftEffectView.hidden = YES;
@@ -2136,7 +2136,16 @@
[self.vapGiftEffectView removeFromSuperview];
self.vapGiftEffectView = nil;
if (self.isLargeGiftAnimating == YES) {
self.isLargeGiftAnimating = NO;
}
if(self.svgaQueue.count > 0){
[self.svgaQueue removeObjectAtIndex:0];
}
if(self.svgaQueue.count > 0 && self.isLargeGiftAnimating == NO){
[self createGiftSvgaAnimation:self.svgaQueue.firstObject];
}
} else if(container == self.luckyVapGiftEffectView) {
[self.luckyVapGiftEffectView removeFromSuperview];
@@ -2160,6 +2169,16 @@
} else if (container == self.vapGiftEffectView) {
[self.vapGiftEffectView removeFromSuperview];
self.vapGiftEffectView = nil;
if (self.isLargeGiftAnimating == YES) {
self.isLargeGiftAnimating = NO;
}
if(self.svgaQueue.count > 0){
[self.svgaQueue removeObjectAtIndex:0];
}
if(self.svgaQueue.count > 0 && self.isLargeGiftAnimating == NO){
[self createGiftSvgaAnimation:self.svgaQueue.firstObject];
}
} else if(container == self.luckyVapGiftEffectView) {
[self.luckyVapGiftEffectView removeFromSuperview];
self.luckyVapGiftEffectView = nil;