@@ -1222,6 +1222,38 @@ static BOOL findCell(ASNodeController *nodeController, NSArray <NSString *> *ide
1222
1222
%end
1223
1223
1224
1224
// 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
+
1225
1257
// YT startup animation
1226
1258
%hook YTColdConfig
1227
1259
- (BOOL )mainAppCoreClientIosEnableStartupAnimation {
@@ -1490,6 +1522,9 @@ static BOOL findCell(ASNodeController *nodeController, NSArray <NSString *> *ide
1490
1522
if (IS_ENABLED (@" uYouAdBlockingWorkaround_enabled" )) {
1491
1523
%init (uYouAdBlockingWorkaround);
1492
1524
}
1525
+ if (IS_ENABLED (@" hideHomeTab_enabled" )) {
1526
+ %init (gHideHomeTab );
1527
+ }
1493
1528
1494
1529
// YTNoModernUI - @arichorn
1495
1530
BOOL ytNoModernUIEnabled = IS_ENABLED (@" ytNoModernUI_enabled" );
0 commit comments