Skip to content

Commit

Permalink
Fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
arichornlover authored Dec 14, 2022
1 parent 58a2aa7 commit 83eb564
Showing 1 changed file with 30 additions and 35 deletions.
65 changes: 30 additions & 35 deletions CercubePlus.xm
Original file line number Diff line number Diff line change
Expand Up @@ -1595,41 +1595,6 @@ void DEMC_centerRenderingView() {
centerYConstraint.active = YES;
}


// YTUnShorts - https://github.com/PoomSmart/YTUnShorts
BOOL didLateHook = NO;

%group LateHook

%hook YTIElementRenderer

- (NSData *)elementData {
NSString *description = [self description];
if ([description containsString:@"shorts_shelf.eml"] || [description containsString:@"#shorts"])
return nil;
return %orig;
}

%end

%end

%hook YTSectionListViewController

- (void)loadWithModel:(id)model {
if (!didLateHook) {
%init(LateHook);
didLateHook = YES;
}
%orig;
}

%end

%ctor {
%init;
} // YTUnShorts

// YTSpeed - https://github.com/Lyvendia/YTSpeed
%hook YTVarispeedSwitchController
- (id)init {
Expand Down Expand Up @@ -1678,6 +1643,36 @@ BOOL didLateHook = NO;
%end

# pragma mark - ctor
// YTUnShorts - https://github.com/PoomSmart/YTUnShorts
BOOL didLateHook = NO;

%group LateHook

%hook YTIElementRenderer

- (NSData *)elementData {
NSString *description = [self description];
if ([description containsString:@"shorts_shelf.eml"] || [description containsString:@"#shorts"])
return nil;
return %orig;
}

%end

%end

%hook YTSectionListViewController

- (void)loadWithModel:(id)model {
if (!didLateHook) {
%init(LateHook);
didLateHook = YES;
}
%orig;
}

%end // YTUnShorts

%ctor {
%init;
if (oled()) {
Expand Down

0 comments on commit 83eb564

Please sign in to comment.