Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions AwemeHeaders.h
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,9 @@ typedef NS_ENUM(NSUInteger, DYEdgeMode) {
- (AWECommentLongPressPanelContext *)commentPageContext;
@end

@interface _TtC21AWEIncentiveSwiftImpl29IncentivePendantContainerView : UIView
@end

@interface AWECommentLongPressPanelSwiftImpl_CommentLongPressPanelReportElement : NSObject
- (AWECommentLongPressPanelContext *)commentPageContext;
- (BOOL)elementShouldShow;
Expand Down Expand Up @@ -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;
Expand Down
50 changes: 17 additions & 33 deletions DYYY.xm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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:");
Expand Down
2 changes: 1 addition & 1 deletion DYYYSettings.xm
Original file line number Diff line number Diff line change
Expand Up @@ -1507,7 +1507,7 @@ void showDYYYSettingsVC(UIViewController *rootVC, BOOL hasAgreed) {
@{
@"identifier" : @"DYYYHidePendantGroup",
@"title" : @"隐藏红包悬浮",
@"subTitle" : @"隐藏抖音极速版的红包悬浮按钮,可能失效,不修复。",
@"subTitle" : @"隐藏抖音极速版和抖音部分视频的红包悬浮按钮,可能失效,不修复。",
@"detail" : @"",
@"cellType" : @37,
@"imageName" : @"ic_eyeslash_outlined_16"
Expand Down
Loading