mirror of
https://github.com/SoPat712/YTLitePlus.git
synced 2025-08-22 02:38:45 -04:00
Fix bugs
This commit is contained in:
@@ -396,7 +396,7 @@ static const NSInteger YTLiteSection = 789;
|
|||||||
// Toggle for haptic feedback
|
// Toggle for haptic feedback
|
||||||
BASIC_SWITCH(LOC(@"PLAYER_GESTURES_HAPTIC_FEEDBACK"), nil, @"playerGesturesHapticFeedback_enabled"),
|
BASIC_SWITCH(LOC(@"PLAYER_GESTURES_HAPTIC_FEEDBACK"), nil, @"playerGesturesHapticFeedback_enabled"),
|
||||||
];
|
];
|
||||||
YTSettingsPickerViewController *picker = [[%c(YTSettingsPickerViewController) alloc] initWithNavTitle:LOC(@"Player Gestures (Beta)") pickerSectionTitle:nil rows:rows selectedItemIndex:NSNotFound parentResponder:[self parentResponder]];
|
YTSettingsPickerViewController *picker = [[%c(YTSettingsPickerViewController) alloc] initWithNavTitle:LOC(@"PLAYER_GESTURES_TITLE") pickerSectionTitle:nil rows:rows selectedItemIndex:NSNotFound parentResponder:[self parentResponder]];
|
||||||
[settingsViewController pushViewController:picker];
|
[settingsViewController pushViewController:picker];
|
||||||
return YES;
|
return YES;
|
||||||
}];
|
}];
|
||||||
|
@@ -172,14 +172,17 @@ BOOL isSelf() {
|
|||||||
|
|
||||||
// Disable YouTube Plus incompatibility warning popup - @bhackel
|
// Disable YouTube Plus incompatibility warning popup - @bhackel
|
||||||
%hook HelperVC
|
%hook HelperVC
|
||||||
- (void)viewDidLoad {
|
|
||||||
%orig;
|
- (void)viewWillAppear:(BOOL)animated {
|
||||||
// Check if it responds to the selector riskButtonTapped
|
%orig; // Call the original implementation
|
||||||
if ([self respondsToSelector:@selector(riskButtonTapped)]) {
|
|
||||||
// Call the selector riskButtonTapped
|
// // Hide the view before it appears
|
||||||
[self performSelector:@selector(riskButtonTapped)];
|
// self.view.hidden = YES;
|
||||||
}
|
|
||||||
|
// // Optionally, you can remove the view from the superview to ensure it's gone
|
||||||
|
// [self.view removeFromSuperview];
|
||||||
}
|
}
|
||||||
|
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
|
||||||
@@ -1240,6 +1243,8 @@ NSInteger pageStyle = 0;
|
|||||||
%init;
|
%init;
|
||||||
// Access YouGroupSettings methods
|
// Access YouGroupSettings methods
|
||||||
dlopen([[NSString stringWithFormat:@"%@/Frameworks/YouGroupSettings.dylib", [[NSBundle mainBundle] bundlePath]] UTF8String], RTLD_LAZY);
|
dlopen([[NSString stringWithFormat:@"%@/Frameworks/YouGroupSettings.dylib", [[NSBundle mainBundle] bundlePath]] UTF8String], RTLD_LAZY);
|
||||||
|
// Access YouTube Plus methods
|
||||||
|
dlopen([[NSString stringWithFormat:@"%@/Frameworks/YTLite.dylib", [[NSBundle mainBundle] bundlePath]] UTF8String], RTLD_LAZY);
|
||||||
|
|
||||||
if (IsEnabled(@"hideCastButton_enabled")) {
|
if (IsEnabled(@"hideCastButton_enabled")) {
|
||||||
%init(gHideCastButton);
|
%init(gHideCastButton);
|
||||||
@@ -1322,8 +1327,6 @@ NSInteger pageStyle = 0;
|
|||||||
NSString *documentsDirectory = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject];
|
NSString *documentsDirectory = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject];
|
||||||
NSString *settingsPath = [documentsDirectory stringByAppendingPathComponent:@"iSponsorBlock.plist"];
|
NSString *settingsPath = [documentsDirectory stringByAppendingPathComponent:@"iSponsorBlock.plist"];
|
||||||
NSMutableDictionary *settings = [NSMutableDictionary dictionary];
|
NSMutableDictionary *settings = [NSMutableDictionary dictionary];
|
||||||
NSDictionary *existingSettings = [NSDictionary dictionaryWithContentsOfFile:settingsPath];
|
|
||||||
[settings addEntriesFromDictionary:existingSettings];
|
|
||||||
[settings setObject:@(NO) forKey:@"enabled"];
|
[settings setObject:@(NO) forKey:@"enabled"];
|
||||||
[settings writeToFile:settingsPath atomically:YES];
|
[settings writeToFile:settingsPath atomically:YES];
|
||||||
// Set miscellaneous YTLitePlus features to enabled
|
// Set miscellaneous YTLitePlus features to enabled
|
||||||
|
Reference in New Issue
Block a user