移除 XPRoomViewController 和 RoomAnimationView 中的调试代码,提升代码整洁性和可维护性。
This commit is contained in:
@@ -2651,9 +2651,6 @@ BannerSchedulerDelegate
|
|||||||
- (XPRoomAnimationHitView *)bannerContainer {
|
- (XPRoomAnimationHitView *)bannerContainer {
|
||||||
if (!_bannerContainer) {
|
if (!_bannerContainer) {
|
||||||
_bannerContainer = [[XPRoomAnimationHitView alloc] init];
|
_bannerContainer = [[XPRoomAnimationHitView alloc] init];
|
||||||
#if DEBUG
|
|
||||||
_bannerContainer.backgroundColor = [UIColor colorWithWhite:0.8 alpha:0.4];
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
return _bannerContainer;
|
return _bannerContainer;
|
||||||
}
|
}
|
||||||
@@ -3649,14 +3646,6 @@ BannerSchedulerDelegate
|
|||||||
self.savedTapPoint = CGPointZero;
|
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 {
|
- (CGRect)calculateInteractiveBoundsForView:(UIView *)view {
|
||||||
// 计算视图的可交互区域
|
// 计算视图的可交互区域
|
||||||
// 这里可以根据具体的 Banner 类型来调整可交互区域
|
// 这里可以根据具体的 Banner 类型来调整可交互区域
|
||||||
@@ -3674,44 +3663,6 @@ BannerSchedulerDelegate
|
|||||||
return bounds;
|
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
|
#pragma mark - Cleanup Methods
|
||||||
|
|
||||||
|
@@ -1928,19 +1928,19 @@ XPCandyTreeInsufficientBalanceViewDelegate>
|
|||||||
[self handleNIMNotificationTypeMessage:message];
|
[self handleNIMNotificationTypeMessage:message];
|
||||||
} else if (message.messageType == NIMMessageTypeCustom) {
|
} else if (message.messageType == NIMMessageTypeCustom) {
|
||||||
// 自定义消息排查日志:first/second/size3
|
// 自定义消息排查日志:first/second/size3
|
||||||
#if DEBUG
|
//#if DEBUG
|
||||||
if ([message.messageObject isKindOfClass:[NIMCustomObject class]]) {
|
// if ([message.messageObject isKindOfClass:[NIMCustomObject class]]) {
|
||||||
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
|
// NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
|
||||||
if ([obj.attachment isKindOfClass:[AttachmentModel class]]) {
|
// if ([obj.attachment isKindOfClass:[AttachmentModel class]]) {
|
||||||
AttachmentModel *att = (AttachmentModel *)obj.attachment;
|
// AttachmentModel *att = (AttachmentModel *)obj.attachment;
|
||||||
NSData *payloadJSON = nil;
|
// NSData *payloadJSON = nil;
|
||||||
@try { payloadJSON = [NSJSONSerialization dataWithJSONObject:att.data ?: @{} options:0 error:nil]; } @catch (__unused NSException *e) {}
|
// @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",
|
// NSLog(@"[Recv] 🎯 自定义消息 | first=%ld second=%ld | payload=%lub | sid=%@ | ts=%.3f",
|
||||||
(long)att.first, (long)att.second, (unsigned long)payloadJSON.length,
|
// (long)att.first, (long)att.second, (unsigned long)payloadJSON.length,
|
||||||
message.session.sessionId, [[NSDate date] timeIntervalSince1970]);
|
// message.session.sessionId, [[NSDate date] timeIntervalSince1970]);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
#endif
|
//#endif
|
||||||
[self handleNimCustomTypeMessage:message];
|
[self handleNimCustomTypeMessage:message];
|
||||||
} else if(message.messageType == NIMMessageTypeText) {
|
} else if(message.messageType == NIMMessageTypeText) {
|
||||||
[self.messageContainerView handleNIMTextMessage:message];
|
[self.messageContainerView handleNIMTextMessage:message];
|
||||||
|
Reference in New Issue
Block a user