From e7595c850b4be096babe22910e9b284c82a02236 Mon Sep 17 00:00:00 2001 From: nathalie <140290637+Nathalie-Annis@users.noreply.github.com> Date: Sat, 14 Mar 2026 21:22:06 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=9B=B4=E6=92=AD=E9=97=B4=E4=BA=BA?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AwemeHeaders.h | 4 ++++ DYYY.xm | 41 ++++++++--------------------------------- 2 files changed, 12 insertions(+), 33 deletions(-) diff --git a/AwemeHeaders.h b/AwemeHeaders.h index 341428c90..a097a928a 100644 --- a/AwemeHeaders.h +++ b/AwemeHeaders.h @@ -1258,6 +1258,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..9312392eb 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 @@ -8927,13 +8909,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:"); From 7a8c9e25595f53dc0e19e1c0b9e3866e4fa8c9ce Mon Sep 17 00:00:00 2001 From: nathalie <140290637+Nathalie-Annis@users.noreply.github.com> Date: Sat, 14 Mar 2026 21:39:45 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=9A=90=E8=97=8F=E9=83=A8=E5=88=86?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E7=9A=84=E7=BA=A2=E5=8C=85=E6=8A=BD=E5=A5=96?= =?UTF-8?q?=E6=82=AC=E6=B5=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AwemeHeaders.h | 3 +++ DYYY.xm | 9 +++++++++ DYYYSettings.xm | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/AwemeHeaders.h b/AwemeHeaders.h index a097a928a..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; diff --git a/DYYY.xm b/DYYY.xm index 9312392eb..0e886eead 100644 --- a/DYYY.xm +++ b/DYYY.xm @@ -8645,6 +8645,15 @@ static Class TagViewClass = nil; } %end +%hook _TtC21AWEIncentiveSwiftImpl29IncentivePendantContainerView +- (void)layoutSubviews { + %orig; + if (DYYYGetBool(@"DYYYHidePendantGroup")) { + [self removeFromSuperview]; + } +} +%end + %hook UIImageView - (void)layoutSubviews { %orig; 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"