修复bug
This commit is contained in:
@@ -1648,7 +1648,7 @@
|
||||
}
|
||||
///开启普通礼物特效定时器
|
||||
- (void)startHandleGiftEffectTimer {
|
||||
NSTimeInterval period = 6.0; //设置时间间隔 6秒是 1、单纯的svga 2.有横幅有svga 3、只有横幅
|
||||
NSTimeInterval period = 1.0; //设置时间间隔 6秒是 1、单纯的svga 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];
|
||||
|
Reference in New Issue
Block a user