From f9c80aabb2b0169aba2fae900fd1d1c3d1071cff Mon Sep 17 00:00:00 2001 From: Wangin1996 Date: Mon, 16 Mar 2026 13:05:06 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A8=E8=8D=90?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E5=9B=BE=E6=96=87=EF=BC=8C=E6=8E=A8=E8=8D=90?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E6=96=87=E5=AD=97=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AwemeHeaders.h | 7 +++++++ DYYY.xm | 50 +++++++++++++++++-------------------------------- DYYYSettings.xm | 2 +- 3 files changed, 25 insertions(+), 34 deletions(-) diff --git a/AwemeHeaders.h b/AwemeHeaders.h index 341428c90..28dbe6162 100644 --- a/AwemeHeaders.h +++ b/AwemeHeaders.h @@ -597,6 +597,9 @@ typedef NS_ENUM(NSUInteger, DYEdgeMode) { - (AWECommentLongPressPanelContext *)commentPageContext; @end +@interface _TtC21AWEIncentiveSwiftImpl29IncentivePendantContainerView : UIView +@end + @interface AWECommentLongPressPanelSwiftImpl_CommentLongPressPanelReportElement : NSObject - (AWECommentLongPressPanelContext *)commentPageContext; - (BOOL)elementShouldShow; @@ -1258,6 +1261,10 @@ typedef NS_ENUM(NSUInteger, DYEdgeMode) { @interface IESLiveRoomComponent : NSObject @end +@interface IESLiveUserSeqlistFragment : NSObject +- (void)refreshVerticalUserCount:(id)arg1 horizontalUserCount:(id)arg2 trueValue:(NSInteger)arg3; +@end + @interface HTSLiveStreamQualityFragment : IESLiveRoomComponent @property(nonatomic, strong) NSArray *streamQualityArray; - (NSArray *)getQualities; diff --git a/DYYY.xm b/DYYY.xm index f5fe3031a..0e886eead 100644 --- a/DYYY.xm +++ b/DYYY.xm @@ -555,36 +555,18 @@ static BOOL DYYYShouldHandleSpeedFeatures(void) { %end // 直播间真实人数 +%hook IESLiveUserSeqlistFragment -static NSString *(*orig_displayShort)(id, SEL); -static NSString *my_displayShort(id self, SEL _cmd) { - if (!DYYYGetBool(@"DYYYEnableLiveRealCount")) return orig_displayShort(self, _cmd); - if ([self respondsToSelector:@selector(displayValue)]) { - NSInteger count = (NSInteger)[self performSelector:@selector(displayValue)]; - if (count > 0) return [NSString stringWithFormat:@"%ld", (long)count]; - } - return orig_displayShort(self, _cmd); -} - -static NSString *(*orig_displayMiddle)(id, SEL); -static NSString *my_displayMiddle(id self, SEL _cmd) { - if (!DYYYGetBool(@"DYYYEnableLiveRealCount")) return orig_displayMiddle(self, _cmd); - if ([self respondsToSelector:@selector(displayValue)]) { - NSInteger count = (NSInteger)[self performSelector:@selector(displayValue)]; - if (count > 0) return [NSString stringWithFormat:@"%ld", (long)count]; +- (void)refreshVerticalUserCount:(id)arg1 horizontalUserCount:(id)arg2 trueValue:(NSInteger)trueValue { + if ( trueValue > 0 && DYYYGetBool(@"DYYYEnableLiveRealCount") ) { + NSString *realStr = [NSString stringWithFormat:@"%ld", (long)trueValue]; + %orig(realStr, realStr, trueValue); + } else { + %orig; } - return orig_displayMiddle(self, _cmd); } -static NSString *(*orig_displayLong)(id, SEL); -static NSString *my_displayLong(id self, SEL _cmd) { - if (!DYYYGetBool(@"DYYYEnableLiveRealCount")) return orig_displayLong(self, _cmd); - if ([self respondsToSelector:@selector(displayValue)]) { - NSInteger count = (NSInteger)[self performSelector:@selector(displayValue)]; - if (count > 0) return [NSString stringWithFormat:@"%ld在线观众", (long)count]; - } - return orig_displayLong(self, _cmd); -} +%end // 评论具体时间 %hook AWEDateTimeFormatter @@ -8663,6 +8645,15 @@ static Class TagViewClass = nil; } %end +%hook _TtC21AWEIncentiveSwiftImpl29IncentivePendantContainerView +- (void)layoutSubviews { + %orig; + if (DYYYGetBool(@"DYYYHidePendantGroup")) { + [self removeFromSuperview]; + } +} +%end + %hook UIImageView - (void)layoutSubviews { %orig; @@ -8927,13 +8918,6 @@ static void findTargetViewInView(UIView *view) { %init(DYYYCommentExactTimeGroup, AWECommentSwiftBizUI_CommentInteractionBaseLabel = interactionBaseLabelClass); } - Class statsMessageClass = objc_getClass("HTSLiveRoomStatsMessage"); - if (statsMessageClass) { - MSHookMessageEx(statsMessageClass, @selector(displayShort), (IMP)&my_displayShort, (IMP *)&orig_displayShort); - MSHookMessageEx(statsMessageClass, @selector(displayMiddle), (IMP)&my_displayMiddle, (IMP *)&orig_displayMiddle); - MSHookMessageEx(statsMessageClass, @selector(displayLong), (IMP)&my_displayLong, (IMP *)&orig_displayLong); - } - Class imMenuComponentClass = objc_getClass("AWEIMCustomMenuComponent"); if (imMenuComponentClass) { SEL legacySelector = NSSelectorFromString(@"msg_showMenuForBubbleFrameInScreen:tapLocationInScreen:menuItemList:moreEmoticon:onCell:extra:"); diff --git a/DYYYSettings.xm b/DYYYSettings.xm index 3a421529e..450433370 100644 --- a/DYYYSettings.xm +++ b/DYYYSettings.xm @@ -1507,7 +1507,7 @@ void showDYYYSettingsVC(UIViewController *rootVC, BOOL hasAgreed) { @{ @"identifier" : @"DYYYHidePendantGroup", @"title" : @"隐藏红包悬浮", - @"subTitle" : @"隐藏抖音极速版的红包悬浮按钮,可能失效,不修复。", + @"subTitle" : @"隐藏抖音极速版和抖音部分视频的红包悬浮按钮,可能失效,不修复。", @"detail" : @"", @"cellType" : @37, @"imageName" : @"ic_eyeslash_outlined_16" From 0e2aaafa873ba0fe62aa454c5c4ceb5ba037a60a Mon Sep 17 00:00:00 2001 From: Wangin1996 Date: Mon, 16 Mar 2026 14:13:24 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A8=E8=8D=90?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E5=9B=BE=E6=96=87=EF=BC=8C=E6=8E=A8=E8=8D=90?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E6=96=87=E5=AD=97=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DYYY.xm | 57 +++++++++++++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/DYYY.xm b/DYYY.xm index 0e886eead..38e61212d 100644 --- a/DYYY.xm +++ b/DYYY.xm @@ -4816,7 +4816,6 @@ static NSHashTable *processedParentViews = nil; } %end -// 推荐页数组级过滤(直播 / 时间 / 低赞) %hook AWEHotListDataController %new @@ -4830,7 +4829,7 @@ static NSHashTable *processedParentViews = nil; } if ([rawValue isKindOfClass:[NSString class]]) { - NSString *trimmed = [(NSString *)rawValue stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; + NSString *trimmed = [(NSString *)rawValue stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndnewlineCharacterSet]]; if (trimmed.length == 0) { return nil; } @@ -4860,16 +4859,16 @@ static NSHashTable *processedParentViews = nil; static NSArray *diggKeyPaths = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ - diggKeyPaths = @[ - @"statistics.diggCount", - @"statistics.digg_count", - @"diggCount", - @"digg_count", - @"feedSequenceExtendFeature.digg_count", - @"feedSequenceExtendFeature.diggCount", - @"recommendFeedExtendFeature.digg_count", - @"recommendFeedExtendFeature.diggCount" - ]; + diggKeyPaths = @[ + @"statistics.diggCount", + @"statistics.digg_count", + @"diggCount", + @"digg_count", + @"feedSequenceExtendFeature.digg_count", + @"feedSequenceExtendFeature.diggCount", + @"recommendFeedExtendFeature.digg_count", + @"recommendFeedExtendFeature.diggCount" + ]; }); for (NSString *keyPath in diggKeyPaths) { @@ -4897,13 +4896,14 @@ static NSHashTable *processedParentViews = nil; // --- 配置读取 --- NSInteger daysThreshold = DYYYGetInteger(@"DYYYFilterTimeLimit"); - BOOL skipLive = DYYYGetBool(@"DYYYSkipLive"); // 读取直播过滤开关 - NSInteger minLikesThreshold = DYYYGetInteger(@"DYYYFilterLowLikes"); // 读取低赞过滤阈值 (例如: 1000) + BOOL skipLive = DYYYGetBool(@"DYYYSkipLive"); + NSInteger minLikesThreshold = DYYYGetInteger(@"DYYYFilterLowLikes"); + BOOL skipPhotoText = DYYYGetBool(@"DYYYSkipPhotoText"); + BOOL skipPhoto = DYYYGetBool(@"DYYYSkipPhoto"); NSTimeInterval now = [[NSDate date] timeIntervalSince1970]; NSTimeInterval thresholdInSeconds = MAX(daysThreshold, 0) * 86400.0; - // 第一阶段:先做稳定字段过滤(直播/时间) NSMutableArray *baseFiltered = [NSMutableArray arrayWithCapacity:orig.count]; for (id obj in orig) { @@ -4914,26 +4914,37 @@ static NSHashTable *processedParentViews = nil; AWEAwemeModel *m = (AWEAwemeModel *)obj; - // 1. 广告白名单 if ([m respondsToSelector:@selector(isAds)] && m.isAds) { [baseFiltered addObject:obj]; continue; } - // 2. 直播过滤逻辑 (仅依赖 cellRoom) if (skipLive && [m respondsToSelector:@selector(cellRoom)] && m.cellRoom != nil) { - continue; // 命中直播过滤,跳过 + continue; + } + + if (skipPhotoText && + [m respondsToSelector:@selector(isNewTextMode)] && + m.isNewTextMode && + [m respondsToSelector:@selector(referString)]) { + continue; + } + + if (skipPhoto && + [m respondsToSelector:@selector(awemeType)] && + m.awemeType == 68 && + [m respondsToSelector:@selector(referString)]) { + continue; } - // 3. 时间限制过滤 if (daysThreshold > 0 && [m respondsToSelector:@selector(createTime)]) { NSTimeInterval vTs = [m.createTime doubleValue]; if (vTs > 1e12) { - vTs /= 1000.0; // 毫秒转秒 + vTs /= 1000.0; } if (vTs > 0 && (now - vTs) > thresholdInSeconds) { - continue; // 超过设定时限,跳过 + continue; } } @@ -4944,7 +4955,6 @@ static NSHashTable *processedParentViews = nil; return [baseFiltered copy]; } - // 第二阶段:低赞过滤(字段缺失时放行,避免误杀) NSMutableArray *lowLikesFiltered = [NSMutableArray arrayWithCapacity:baseFiltered.count]; NSInteger awemeCount = 0; NSInteger unresolvedLikesCount = 0; @@ -4961,7 +4971,6 @@ static NSHashTable *processedParentViews = nil; NSNumber *diggCountValue = [self dyyy_resolvedDiggCountForAweme:m]; NSInteger diggCount = diggCountValue.integerValue; - // 新版部分链路点赞字段会短暂缺失/回填为0,这里按未知放行,避免整批误过滤 if (!diggCountValue || diggCount <= 0) { unresolvedLikesCount++; [lowLikesFiltered addObject:obj]; @@ -5117,7 +5126,7 @@ static NSHashTable *processedParentViews = nil; } } } - return shouldFilterAds || shouldFilterAllLive || shouldFilterHotSpot || shouldskipPhoto || shouldskipPhotoText || shouldFilterMusic || shouldFilterAIInteraction || shouldFilterHDR || shouldFilterKeywords || shouldFilterProp || + return shouldFilterAds || shouldFilterAllLive || shouldFilterHotSpot || shouldFilterHDR || shouldFilterKeywords || shouldFilterProp || shouldFilterTime || shouldFilterUser; } From 481f14d81f30e35094fbe6301e0b2e2258c2b1da Mon Sep 17 00:00:00 2001 From: Wangin1996 Date: Mon, 16 Mar 2026 14:33:06 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A8=E8=8D=90?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E5=9B=BE=E6=96=87=EF=BC=8C=E6=8E=A8=E8=8D=90?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E6=96=87=E5=AD=97=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DYYY.xm | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/DYYY.xm b/DYYY.xm index 38e61212d..1e648f9f7 100644 --- a/DYYY.xm +++ b/DYYY.xm @@ -4829,7 +4829,7 @@ static NSHashTable *processedParentViews = nil; } if ([rawValue isKindOfClass:[NSString class]]) { - NSString *trimmed = [(NSString *)rawValue stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndnewlineCharacterSet]]; + NSString *trimmed = [(NSString *)rawValue stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; if (trimmed.length == 0) { return nil; } @@ -4896,14 +4896,15 @@ static NSHashTable *processedParentViews = nil; // --- 配置读取 --- NSInteger daysThreshold = DYYYGetInteger(@"DYYYFilterTimeLimit"); - BOOL skipLive = DYYYGetBool(@"DYYYSkipLive"); - NSInteger minLikesThreshold = DYYYGetInteger(@"DYYYFilterLowLikes"); - BOOL skipPhotoText = DYYYGetBool(@"DYYYSkipPhotoText"); - BOOL skipPhoto = DYYYGetBool(@"DYYYSkipPhoto"); + BOOL skipLive = DYYYGetBool(@"DYYYSkipLive"); // 读取直播过滤开关 + NSInteger minLikesThreshold = DYYYGetInteger(@"DYYYFilterLowLikes"); // 读取低赞过滤阈值 (例如: 1000) + BOOL skipPhotoText = DYYYGetBool(@"DYYYSkipPhotoText"); // 图文过滤 + BOOL skipPhoto = DYYYGetBool(@"DYYYSkipPhoto"); // 图集过滤 NSTimeInterval now = [[NSDate date] timeIntervalSince1970]; NSTimeInterval thresholdInSeconds = MAX(daysThreshold, 0) * 86400.0; + // 第一阶段:先做稳定字段过滤(直播/时间/类型) NSMutableArray *baseFiltered = [NSMutableArray arrayWithCapacity:orig.count]; for (id obj in orig) { @@ -4914,37 +4915,44 @@ static NSHashTable *processedParentViews = nil; AWEAwemeModel *m = (AWEAwemeModel *)obj; + // 1. 广告白名单 if ([m respondsToSelector:@selector(isAds)] && m.isAds) { [baseFiltered addObject:obj]; continue; } + // 2. 直播过滤逻辑 (仅依赖 cellRoom) if (skipLive && [m respondsToSelector:@selector(cellRoom)] && m.cellRoom != nil) { - continue; + continue; // 命中直播过滤,跳过 } + // 2.1 图文模式过滤逻辑(推荐页) if (skipPhotoText && [m respondsToSelector:@selector(isNewTextMode)] && m.isNewTextMode && - [m respondsToSelector:@selector(referString)]) { - continue; + [m respondsToSelector:@selector(referString)] && + [m.referString isEqualToString:@"homepage_hot"]) { + continue; // 图文模式且来自推荐页,跳过 } + // 2.2 图集过滤逻辑(推荐页) if (skipPhoto && [m respondsToSelector:@selector(awemeType)] && m.awemeType == 68 && - [m respondsToSelector:@selector(referString)]) { - continue; + [m respondsToSelector:@selector(referString)] && + [m.referString isEqualToString:@"homepage_hot"]) { + continue; // 图集且来自推荐页,跳过 } + // 3. 时间限制过滤 if (daysThreshold > 0 && [m respondsToSelector:@selector(createTime)]) { NSTimeInterval vTs = [m.createTime doubleValue]; if (vTs > 1e12) { - vTs /= 1000.0; + vTs /= 1000.0; // 毫秒转秒 } if (vTs > 0 && (now - vTs) > thresholdInSeconds) { - continue; + continue; // 超过设定时限,跳过 } } @@ -4955,6 +4963,7 @@ static NSHashTable *processedParentViews = nil; return [baseFiltered copy]; } + // 第二阶段:低赞过滤(字段缺失时放行,避免误杀) NSMutableArray *lowLikesFiltered = [NSMutableArray arrayWithCapacity:baseFiltered.count]; NSInteger awemeCount = 0; NSInteger unresolvedLikesCount = 0; @@ -4971,6 +4980,7 @@ static NSHashTable *processedParentViews = nil; NSNumber *diggCountValue = [self dyyy_resolvedDiggCountForAweme:m]; NSInteger diggCount = diggCountValue.integerValue; + // 新版部分链路点赞字段会短暂缺失/回填为0,这里按未知放行,避免整批误过滤 if (!diggCountValue || diggCount <= 0) { unresolvedLikesCount++; [lowLikesFiltered addObject:obj];