From b9de95b4e62e46be5eafea9f9b4f2af51439f5fc Mon Sep 17 00:00:00 2001 From: edwinQQQ Date: Thu, 21 Aug 2025 18:54:04 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=20XPRoomViewController=20?= =?UTF-8?q?=E5=92=8C=20RoomAnimationView=20=E4=B8=AD=E7=9A=84=E8=B0=83?= =?UTF-8?q?=E8=AF=95=E4=BB=A3=E7=A0=81=EF=BC=8C=E6=8F=90=E5=8D=87=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=95=B4=E6=B4=81=E6=80=A7=E5=92=8C=E5=8F=AF=E7=BB=B4?= =?UTF-8?q?=E6=8A=A4=E6=80=A7=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/AnimationView/RoomAnimationView.m | 49 ------------------- .../YMRoom/View/XPRoomViewController.m | 26 +++++----- 2 files changed, 13 insertions(+), 62 deletions(-) diff --git a/YuMi/Modules/YMRoom/View/AnimationView/RoomAnimationView.m b/YuMi/Modules/YMRoom/View/AnimationView/RoomAnimationView.m index 00e7ebbb..c6df1383 100644 --- a/YuMi/Modules/YMRoom/View/AnimationView/RoomAnimationView.m +++ b/YuMi/Modules/YMRoom/View/AnimationView/RoomAnimationView.m @@ -2651,9 +2651,6 @@ BannerSchedulerDelegate - (XPRoomAnimationHitView *)bannerContainer { if (!_bannerContainer) { _bannerContainer = [[XPRoomAnimationHitView alloc] init]; -#if DEBUG - _bannerContainer.backgroundColor = [UIColor colorWithWhite:0.8 alpha:0.4]; -#endif } return _bannerContainer; } @@ -3649,14 +3646,6 @@ BannerSchedulerDelegate self.savedTapPoint = CGPointZero; } -- (void)debugBannerSchedulerStatus { - NSLog(@"🔍 BannerScheduler 调试信息:"); - NSLog(@"%@", [self.bannerScheduler debugStatus]); - NSLog(@"🔍 RoomAnimationView 状态:"); - NSLog(@" - isRoomBannerV2Displaying: %@", self.isRoomBannerV2Displaying ? @"YES" : @"NO"); - NSLog(@" - bannerContainer.subviews.count: %ld", (long)self.bannerContainer.subviews.count); -} - - (CGRect)calculateInteractiveBoundsForView:(UIView *)view { // 计算视图的可交互区域 // 这里可以根据具体的 Banner 类型来调整可交互区域 @@ -3674,44 +3663,6 @@ BannerSchedulerDelegate return bounds; } -- (void)testBannerScheduler { - NSLog(@"🧪 开始测试 BannerScheduler"); - - // 测试添加 Banner - AttachmentModel *testBanner = [[AttachmentModel alloc] init]; - testBanner.second = Custom_Message_Sub_Super_Gift_Banner; - testBanner.data = @{@"test": @"data"}; - - [self.bannerScheduler enqueueBanner:testBanner]; - - NSLog(@"🧪 测试完成"); -} - -- (void)debugTouchAreaCache { - NSLog(@"🎯 触摸区域缓存调试信息:"); - TouchAreaCacheManager *cacheManager = [TouchAreaCacheManager sharedManager]; - [cacheManager debugPrintCache]; -} - -- (void)debugGestureOptimizer { - NSLog(@"🎯 手势优化器调试信息:"); - GestureOptimizer *optimizer = [GestureOptimizer sharedOptimizer]; - - // 测试不同区域的点 - CGFloat containerWidth = self.bannerContainer.bounds.size.width; - CGPoint leftPoint = CGPointMake(containerWidth * 0.1, 40); // 左侧区域 - CGPoint centerPoint = CGPointMake(containerWidth * 0.5, 40); // 中央区域 - CGPoint rightPoint = CGPointMake(containerWidth * 0.9, 40); // 右侧区域 - - NSLog(@"🎯 测试左侧区域点:"); - [optimizer debugGestureAreaForPoint:leftPoint containerWidth:containerWidth]; - - NSLog(@"🎯 测试中央区域点:"); - [optimizer debugGestureAreaForPoint:centerPoint containerWidth:containerWidth]; - - NSLog(@"🎯 测试右侧区域点:"); - [optimizer debugGestureAreaForPoint:rightPoint containerWidth:containerWidth]; -} #pragma mark - Cleanup Methods diff --git a/YuMi/Modules/YMRoom/View/XPRoomViewController.m b/YuMi/Modules/YMRoom/View/XPRoomViewController.m index a3db1c93..0848578d 100644 --- a/YuMi/Modules/YMRoom/View/XPRoomViewController.m +++ b/YuMi/Modules/YMRoom/View/XPRoomViewController.m @@ -1928,19 +1928,19 @@ XPCandyTreeInsufficientBalanceViewDelegate> [self handleNIMNotificationTypeMessage:message]; } else if (message.messageType == NIMMessageTypeCustom) { // 自定义消息排查日志:first/second/size3 -#if DEBUG - if ([message.messageObject isKindOfClass:[NIMCustomObject class]]) { - NIMCustomObject *obj = (NIMCustomObject *)message.messageObject; - if ([obj.attachment isKindOfClass:[AttachmentModel class]]) { - AttachmentModel *att = (AttachmentModel *)obj.attachment; - NSData *payloadJSON = nil; - @try { payloadJSON = [NSJSONSerialization dataWithJSONObject:att.data ?: @{} options:0 error:nil]; } @catch (__unused NSException *e) {} - NSLog(@"[Recv] 🎯 自定义消息 | first=%ld second=%ld | payload=%lub | sid=%@ | ts=%.3f", - (long)att.first, (long)att.second, (unsigned long)payloadJSON.length, - message.session.sessionId, [[NSDate date] timeIntervalSince1970]); - } - } -#endif +//#if DEBUG +// if ([message.messageObject isKindOfClass:[NIMCustomObject class]]) { +// NIMCustomObject *obj = (NIMCustomObject *)message.messageObject; +// if ([obj.attachment isKindOfClass:[AttachmentModel class]]) { +// AttachmentModel *att = (AttachmentModel *)obj.attachment; +// NSData *payloadJSON = nil; +// @try { payloadJSON = [NSJSONSerialization dataWithJSONObject:att.data ?: @{} options:0 error:nil]; } @catch (__unused NSException *e) {} +// NSLog(@"[Recv] 🎯 自定义消息 | first=%ld second=%ld | payload=%lub | sid=%@ | ts=%.3f", +// (long)att.first, (long)att.second, (unsigned long)payloadJSON.length, +// message.session.sessionId, [[NSDate date] timeIntervalSince1970]); +// } +// } +//#endif [self handleNimCustomTypeMessage:message]; } else if(message.messageType == NIMMessageTypeText) { [self.messageContainerView handleNIMTextMessage:message];