Update uYouPlus.xm

This commit is contained in:
arichornlover 2024-06-25 23:39:25 -05:00 committed by GitHub
parent cc0651b9d5
commit 3f06713815
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -100,14 +100,10 @@ NSBundle *tweakBundle = uYouPlusBundle();
}
%new;
- (void)settingsAction {
YTSettingsViewController *settingsVC = [(YTSettingsViewController *)[self settingsView] settingsView];
if (settingsVC) {
UIViewController *rootVC = [UIApplication sharedApplication].keyWindow.rootViewController;
UINavigationController *navController = (UINavigationController *)rootVC;
[navController pushViewController:settingsVC animated:YES];
} else {
NSLog(@"YTSettingsViewController settingsView not found.");
}
YTSettingsViewController *settingsVC = [YTSettingsViewController new];
UIViewController *rootVC = [UIApplication sharedApplication].keyWindow.rootViewController;
UINavigationController *navController = (UINavigationController *)rootVC;
[navController pushViewController:settingsVC animated:YES];
}
%end