option to hide the upper bar #713
This commit is contained in:
+10
@@ -379,6 +379,16 @@ extern NSBundle *uYouPlusBundle();
|
|||||||
}
|
}
|
||||||
settingItemId:0],
|
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")
|
[YTSettingsSectionItemClass switchItemWithTitle:LOC(@"NEW_MINIPLAYER_STYLE")
|
||||||
titleDescription:LOC(@"NEW_MINIPLAYER_STYLE_DESC")
|
titleDescription:LOC(@"NEW_MINIPLAYER_STYLE_DESC")
|
||||||
accessibilityIdentifier:nil
|
accessibilityIdentifier:nil
|
||||||
|
|||||||
+32
-13
@@ -809,20 +809,13 @@ void DEMC_centerRenderingView() {
|
|||||||
%hook MLHAMQueuePlayer
|
%hook MLHAMQueuePlayer
|
||||||
- (void)setRate:(float)rate {
|
- (void)setRate:(float)rate {
|
||||||
MSHookIvar<float>(self, "_rate") = rate;
|
MSHookIvar<float>(self, "_rate") = rate;
|
||||||
MSHookIvar<float>(self, "_preferredRate") = rate;
|
|
||||||
|
|
||||||
id player = MSHookIvar<HAMPlayerInternal *>(self, "_player");
|
id ytPlayer = MSHookIvar<HAMPlayerInternal *>(self, "_player");
|
||||||
[player setRate: rate];
|
[ytPlayer setRate:rate];
|
||||||
|
|
||||||
id stickySettings = MSHookIvar<MLPlayerStickySettings *>(self, "_stickySettings");
|
|
||||||
[stickySettings setRate: rate];
|
|
||||||
|
|
||||||
[self.playerEventCenter broadcastRateChange: rate];
|
[self.playerEventCenter broadcastRateChange:rate];
|
||||||
|
|
||||||
YTSingleVideoController *singleVideoController = self.delegate;
|
|
||||||
[singleVideoController playerRateDidChange: rate];
|
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%hook YTPlayerViewController
|
%hook YTPlayerViewController
|
||||||
%property float playbackRate;
|
%property float playbackRate;
|
||||||
@@ -1308,6 +1301,29 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha:
|
|||||||
%end
|
%end
|
||||||
%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
|
# pragma mark - ctor
|
||||||
%ctor {
|
%ctor {
|
||||||
// Load uYou first so its functions are available for hooks.
|
// 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);
|
%init(gOLED);
|
||||||
}
|
}
|
||||||
if (oldDarkTheme()) {
|
if (oldDarkTheme()) {
|
||||||
%init(gOldDarkTheme)
|
%init(gOldDarkTheme)
|
||||||
}
|
}
|
||||||
if (IsEnabled(@"oledKeyBoard_enabled")) {
|
if (IsEnabled(@"oledKeyBoard_enabled")) {
|
||||||
%init(gOLEDKB);
|
%init(gOLEDKB);
|
||||||
}
|
}
|
||||||
if (IsEnabled(@"disableHints_enabled")) {
|
if (IsEnabled(@"disableHints_enabled")) {
|
||||||
%init(gDisableHints);
|
%init(gDisableHints);
|
||||||
|
}
|
||||||
|
if (IsEnabled(@"hideChipBar_enabled")) {
|
||||||
|
%init(gHideChipBar);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disable updates
|
// Disable updates
|
||||||
|
|||||||
Reference in New Issue
Block a user