Rewrite YTNoCommunityPosts Code

Thanks to iCrazeiOS, it can use YTIElementRenderer
This commit is contained in:
arichornlover 2023-12-17 11:02:57 -06:00 committed by GitHub
parent c0006a59ad
commit c27ed8854a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -915,10 +915,17 @@ static void replaceTab(YTIGuideResponse *response) {
}
}
}
// Hide Community Posts - @michael-winay & @arichorn
if (IsEnabled(@"hideCommunityPosts_enabled")) {
if ([description containsString:@"post_base_wrapper.eml"]) {
return nil;
}
}
return %orig;
}
%end
/* Deprecated Method - Loads indefinitely on newer YouTube Versions
// Hide Community Posts - @michael-winay & @arichorn
%hook YTAsyncCollectionView
- (id)cellForItemAtIndexPath:(NSIndexPath *)indexPath {
@ -942,6 +949,7 @@ static void replaceTab(YTIGuideResponse *response) {
[self deleteItemsAtIndexPaths:@[indexPath]];
}
%end
*/
// Red Subscribe Button - @arichorn
%hook ELMContainerNode