@@ -1222,6 +1222,38 @@ static BOOL findCell(ASNodeController *nodeController, NSArray <NSString *> *ide
12221222%end
12231223
12241224// Miscellaneous
1225+
1226+ // Hide Home Tab - @bhackel
1227+ %group gHideHomeTab
1228+ %hook YTPivotBarView
1229+ - (void )setRenderer:(YTIPivotBarRenderer *)renderer {
1230+ // Iterate over each renderer item
1231+ NSLog (@" bhackel: setting renderer" );
1232+ NSUInteger indexToRemove = -1 ;
1233+ NSMutableArray <YTIPivotBarSupportedRenderers *> *itemsArray = renderer.itemsArray ;
1234+ NSLog (@" bhackel: starting loop" );
1235+ for (NSUInteger i = 0 ; i < itemsArray.count ; i++) {
1236+ NSLog (@" bhackel: iterating index %lu " , (unsigned long )i);
1237+ YTIPivotBarSupportedRenderers *item = itemsArray[i];
1238+ // Check if this is the home tab button
1239+ NSLog (@" bhackel: checking identifier" );
1240+ YTIPivotBarItemRenderer *pivotBarItemRenderer = item.pivotBarItemRenderer ;
1241+ NSString *pivotIdentifier = pivotBarItemRenderer.pivotIdentifier ;
1242+ if ([pivotIdentifier isEqualToString: @" FEwhat_to_watch" ]) {
1243+ NSLog (@" bhackel: removing home tab button" );
1244+ // Remove the home tab button
1245+ indexToRemove = i;
1246+ break ;
1247+ }
1248+ }
1249+ if (indexToRemove != -1 ) {
1250+ [itemsArray removeObjectAtIndex: indexToRemove];
1251+ }
1252+ %orig ;
1253+ }
1254+ %end
1255+ %end
1256+
12251257// YT startup animation
12261258%hook YTColdConfig
12271259- (BOOL )mainAppCoreClientIosEnableStartupAnimation {
@@ -1490,6 +1522,9 @@ static BOOL findCell(ASNodeController *nodeController, NSArray <NSString *> *ide
14901522 if (IS_ENABLED (@" uYouAdBlockingWorkaround_enabled" )) {
14911523 %init (uYouAdBlockingWorkaround);
14921524 }
1525+ if (IS_ENABLED (@" hideHomeTab_enabled" )) {
1526+ %init (gHideHomeTab );
1527+ }
14931528
14941529 // YTNoModernUI - @arichorn
14951530 BOOL ytNoModernUIEnabled = IS_ENABLED (@" ytNoModernUI_enabled" );
0 commit comments