mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-04-20 15:02:08 +00:00
option to hide the upper bar #713
This commit is contained in:
parent
3076e10106
commit
b4ea59f3c1
2 changed files with 42 additions and 13 deletions
10
Settings.xm
10
Settings.xm
|
|
@ -379,6 +379,16 @@ extern NSBundle *uYouPlusBundle();
|
|||
}
|
||||
settingItemId:0],
|
||||
|
||||
[YTSettingsSectionItemClass switchItemWithTitle:LOC(@"HIDE_CHIP_BAR")
|
||||
titleDescription:LOC(@"HIDE_CHIP_BAR_DESC")
|
||||
accessibilityIdentifier:nil
|
||||
switchOn:IsEnabled(@"hideChipBar_enabled")
|
||||
switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hideChipBar_enabled"];
|
||||
return YES;
|
||||
}
|
||||
settingItemId:0],
|
||||
|
||||
[YTSettingsSectionItemClass switchItemWithTitle:LOC(@"NEW_MINIPLAYER_STYLE")
|
||||
titleDescription:LOC(@"NEW_MINIPLAYER_STYLE_DESC")
|
||||
accessibilityIdentifier:nil
|
||||
|
|
|
|||
45
uYouPlus.xm
45
uYouPlus.xm
|
|
@ -809,20 +809,13 @@ void DEMC_centerRenderingView() {
|
|||
%hook MLHAMQueuePlayer
|
||||
- (void)setRate:(float)rate {
|
||||
MSHookIvar<float>(self, "_rate") = rate;
|
||||
MSHookIvar<float>(self, "_preferredRate") = rate;
|
||||
|
||||
id player = MSHookIvar<HAMPlayerInternal *>(self, "_player");
|
||||
[player setRate: rate];
|
||||
|
||||
id stickySettings = MSHookIvar<MLPlayerStickySettings *>(self, "_stickySettings");
|
||||
[stickySettings setRate: rate];
|
||||
id ytPlayer = MSHookIvar<HAMPlayerInternal *>(self, "_player");
|
||||
[ytPlayer setRate:rate];
|
||||
|
||||
[self.playerEventCenter broadcastRateChange: rate];
|
||||
|
||||
YTSingleVideoController *singleVideoController = self.delegate;
|
||||
[singleVideoController playerRateDidChange: rate];
|
||||
[self.playerEventCenter broadcastRateChange:rate];
|
||||
}
|
||||
%end
|
||||
%end
|
||||
|
||||
%hook YTPlayerViewController
|
||||
%property float playbackRate;
|
||||
|
|
@ -1308,6 +1301,29 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha:
|
|||
%end
|
||||
%end
|
||||
|
||||
// Hide the Chip Bar (Upper Bar) in Home feed
|
||||
%group gHideChipBar
|
||||
%hook YTMySubsFilterHeaderView
|
||||
- (void)setChipFilterView:(id)arg1 {}
|
||||
%end
|
||||
|
||||
%hook YTHeaderContentComboView
|
||||
- (void)enableSubheaderBarWithView:(id)arg1 {}
|
||||
%end
|
||||
|
||||
%hook YTHeaderContentComboView
|
||||
- (void)setFeedHeaderScrollMode:(int)arg1 { %orig(0); }
|
||||
%end
|
||||
|
||||
// Hide the chip bar under the video player?
|
||||
// %hook YTChipCloudCell //
|
||||
// - (void)didMoveToWindow {
|
||||
// %orig;
|
||||
// self.hidden = YES;
|
||||
// }
|
||||
// %end
|
||||
%end
|
||||
|
||||
# pragma mark - ctor
|
||||
%ctor {
|
||||
// Load uYou first so its functions are available for hooks.
|
||||
|
|
@ -1339,13 +1355,16 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha:
|
|||
%init(gOLED);
|
||||
}
|
||||
if (oldDarkTheme()) {
|
||||
%init(gOldDarkTheme)
|
||||
%init(gOldDarkTheme)
|
||||
}
|
||||
if (IsEnabled(@"oledKeyBoard_enabled")) {
|
||||
%init(gOLEDKB);
|
||||
}
|
||||
if (IsEnabled(@"disableHints_enabled")) {
|
||||
%init(gDisableHints);
|
||||
%init(gDisableHints);
|
||||
}
|
||||
if (IsEnabled(@"hideChipBar_enabled")) {
|
||||
%init(gHideChipBar);
|
||||
}
|
||||
|
||||
// Disable updates
|
||||
|
|
|
|||
Loading…
Reference in a new issue