修复bug

This commit is contained in:
liyuhua
2023-08-31 15:34:07 +08:00
parent 4db1967331
commit 9ae3f13cee
56 changed files with 1853 additions and 10 deletions

View File

@@ -1648,7 +1648,7 @@
}
///
- (void)startHandleGiftEffectTimer {
NSTimeInterval period = 6.0; // 6 1svga 2.svga 3
NSTimeInterval period = 1.0; // 6 1svga 2.svga 3
dispatch_queue_t queue = dispatch_get_global_queue(0, 0);
dispatch_source_t _timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, queue);
dispatch_source_set_timer(_timer, dispatch_walltime(NULL, 0), period * NSEC_PER_SEC, 0); //
@@ -1657,9 +1657,12 @@
@kStrongify(self)
if (self.svgaQueue.count > 0) {
dispatch_sync(dispatch_get_main_queue(), ^{
GiftReceiveInfoModel * receiveModel = [self.svgaQueue firstObject];
[self createGiftSvgaAnimation:receiveModel];
[self.svgaQueue removeObject:receiveModel];
if(self.isLargeGiftAnimating == NO){
GiftReceiveInfoModel * receiveModel = [self.svgaQueue firstObject];
[self createGiftSvgaAnimation:receiveModel];
[self.svgaQueue removeObject:receiveModel];
}
});
}else {
dispatch_source_cancel(_timer);
@@ -1757,7 +1760,7 @@
- (void)largeGiftStopCarEffect:(double)goldPrice {
if ([ClientConfig shareConfig].configInfo.hideCarEffectGiftPrice <= goldPrice) {
self.isLargeGiftAnimating = YES;
[self.carEffectView stopAnimation];
[self.carVapEffectView stopHWDMP4];
[self.carEffectQueue removeAllObjects];
@@ -1820,7 +1823,7 @@
NSData *data=[NSData dataWithContentsOfFile:filePath options:0 error:NULL];
[self.parser parseWithData:data cacheKey:nil completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
if (videoItem != nil) {
self.isLargeGiftAnimating = YES;
self.giftEffectView.hidden = NO;
if (self.giftEffectView.superview == nil) {
[self.middleLevelView addSubview:self.giftEffectView];
@@ -1857,7 +1860,7 @@
[self.parser parseWithURL:[NSURL URLWithString:vggUrl] completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
if (videoItem != nil) {
self.isLargeGiftAnimating = YES;
self.giftEffectView.hidden = NO;
if (self.giftEffectView.superview == nil) {
[self.middleLevelView addSubview:self.giftEffectView];
@@ -1898,7 +1901,7 @@
NSFileManager *fileManager = [NSFileManager defaultManager];
if ([fileManager fileExistsAtPath:filePath]){
vapUrl = filePath;
self.isLargeGiftAnimating = YES;
self.vapGiftEffectView.hidden = NO;
if (self.vapGiftEffectView.superview == nil) {
[self.middleLevelView addSubview:self.vapGiftEffectView];
@@ -1914,7 +1917,7 @@
}
[self.vapParser parseWithURL:vapUrl completionBlock:^(NSString * _Nullable videoUrl) {
if (videoUrl.length) {
self.isLargeGiftAnimating = YES;
self.vapGiftEffectView.hidden = NO;
if (self.vapGiftEffectView.superview == nil) {
[self.middleLevelView addSubview:self.vapGiftEffectView];