Update uYouPlus.xm

This commit is contained in:
arichornlover 2024-06-22 19:07:39 -05:00 committed by GitHub
parent d7333d4595
commit bc7233df02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -86,9 +86,9 @@ NSBundle *tweakBundle = uYouPlusBundle();
NSMutableArray *retVal = %orig.mutableCopy;
[self setLeadingPadding:+10];
if (self.settingsButton) {
if ([YTSessionRenderer respondsToSelector:@selector(sessionRenderer)]) {
YTSessionRenderer *sessionRenderer = [YTSessionRenderer sessionRenderer];
if ([sessionRenderer.pivots containsObject:@"FElibrary"]) { // Exclude Button from Library/You Tab (reason: it would be a duplicated button)
if ([self _viewControllerForAncestor] != nil && [[self _viewControllerForAncestor] respondsToSelector:@selector(getPivotIdentifier)]) {
NSString *pivotIdentifier = [[self _viewControllerForAncestor] getPivotIdentifier];
if ([pivotIdentifier isEqualToString:@"FElibrary"]) { // Exclude Button from rendering in Library/You Tab
return retVal;
}
}
@ -102,7 +102,7 @@ NSBundle *tweakBundle = uYouPlusBundle();
- (void)settingsAction {
UIViewController *settingsViewController = [self _viewControllerForAncestor];
SettingsViewController *settingsVC = [[SettingsViewController alloc] initWithStyle:UITableViewStyleGrouped];
[settingsViewController presentViewController:settingsVC animated:YES completion:nil]
[settingsViewController presentViewController:settingsVC animated:YES completion:nil];
}
%end