fix compiling, code format

This commit is contained in:
qnblackcat
2022-06-12 13:41:29 +07:00
parent 3383edbb05
commit 163dac3e81
2 changed files with 21 additions and 27 deletions
+4 -5
View File
@@ -1,8 +1,7 @@
#import "Tweaks/YouTubeHeader/YTSettingsViewController.h"
#import "Tweaks/YouTubeHeader/YTSettingsSectionItem.h"
#import "Tweaks/YouTubeHeader/YTSettingsSectionItemManager.h"
#define LOC(x) [tweakBundle localizedStringForKey:x value:nil table:nil]
#import "Header.h"
@interface YTSettingsSectionItemManager (YouPiP)
- (void)updateuYouPlusSectionWithEntry:(id)entry;
@@ -24,8 +23,6 @@ extern BOOL castConfirm();
extern BOOL ytMiniPlayer();
extern BOOL hidePreviousAndNextButton();
NSBundle *tweakBundle = uYouPlusBundle();
// Settings
%hook YTAppSettingsPresentationData
+ (NSArray *)settingsCategoryOrder {
@@ -39,8 +36,10 @@ NSBundle *tweakBundle = uYouPlusBundle();
%end
%hook YTSettingsSectionItemManager
%new - (void)updateuYouPlusSectionWithEntry:(id)entry {
%new
- (void)updateuYouPlusSectionWithEntry:(id)entry {
YTSettingsViewController *delegate = [self valueForKey:@"_dataDelegate"];
NSBundle *tweakBundle = uYouPlusBundle();
YTSettingsSectionItem *hidePreviousAndNextButton = [[%c(YTSettingsSectionItem) alloc] initWithTitle:LOC(@"HIDE_PREVIOUS_AND_NEXT_BUTTON") titleDescription:LOC(@"HIDE_PREVIOUS_AND_NEXT_BUTTON_DESC")];
hidePreviousAndNextButton.hasSwitch = YES;