mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-03-11 17:15:32 +00:00
Hide home tab option
This commit is contained in:
parent
f98e5f7f30
commit
915aac43d2
3 changed files with 30 additions and 0 deletions
|
|
@ -61,6 +61,13 @@
|
|||
@property (nonatomic, strong) UIView *scrimOverlay;
|
||||
@end
|
||||
|
||||
// Hide Home Tab - @bhackel
|
||||
@interface YTPivotBarItemViewAccessibilityControl : UIControl
|
||||
@end
|
||||
@interface YTPivotBarItemView (uYouEnhanced)
|
||||
@property (nonatomic, strong) YTPivotBarItemViewAccessibilityControl *hitTarget;
|
||||
@end
|
||||
|
||||
// YTTapToSeek - https://github.com/bhackel/YTTapToSeek
|
||||
@interface YTMainAppVideoPlayerOverlayViewController : UIViewController
|
||||
- (CGFloat)totalTime;
|
||||
|
|
|
|||
|
|
@ -1222,6 +1222,24 @@ static BOOL findCell(ASNodeController *nodeController, NSArray <NSString *> *ide
|
|||
%end
|
||||
|
||||
// Miscellaneous
|
||||
|
||||
// Hide Home Tab - @bhackel
|
||||
%group gHideHomeTab
|
||||
%hook YTPivotBarItemView
|
||||
- (void)layoutSubviews {
|
||||
%orig;
|
||||
// Check if this is the home tab button
|
||||
YTPivotBarItemViewAccessibilityControl *hitTarget = self.hitTarget;
|
||||
if (!self.hidden && [hitTarget.accessibilityIdentifier isEqualToString:@"id.ui.pivotbar.FEwhat_to_watch.button"]) {
|
||||
// Hide the home tab button
|
||||
self.hidden = YES;
|
||||
self.frame = CGRectZero;
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
}
|
||||
%end
|
||||
%end
|
||||
|
||||
// YT startup animation
|
||||
%hook YTColdConfig
|
||||
- (BOOL)mainAppCoreClientIosEnableStartupAnimation {
|
||||
|
|
@ -1490,6 +1508,9 @@ static BOOL findCell(ASNodeController *nodeController, NSArray <NSString *> *ide
|
|||
if (IS_ENABLED(@"uYouAdBlockingWorkaround_enabled")) {
|
||||
%init(uYouAdBlockingWorkaround);
|
||||
}
|
||||
if (IS_ENABLED(@"hideHomeTab_enabled")) {
|
||||
%init(gHideHomeTab);
|
||||
}
|
||||
|
||||
// YTNoModernUI - @arichorn
|
||||
BOOL ytNoModernUIEnabled = IS_ENABLED(@"ytNoModernUI_enabled");
|
||||
|
|
|
|||
|
|
@ -332,6 +332,8 @@ extern NSBundle *uYouPlusBundle();
|
|||
# pragma mark - UI interface options
|
||||
SECTION_HEADER(LOC(@"UI Interface Options"));
|
||||
|
||||
SWITCH_ITEM2(LOC(@"Hide Home Tab"), LOC(@""), @"hideHomeTab_enabled");
|
||||
|
||||
YTSettingsSectionItem *lowContrastMode = [YTSettingsSectionItemClass
|
||||
switchItemWithTitle:LOC(@"Low Contrast Mode")
|
||||
titleDescription:LOC(@"This will lower the contrast of texts and buttons, similar to the old YouTube Interface. App restart is required.")
|
||||
|
|
|
|||
Loading…
Reference in a new issue