From bc7233df024317bf3d72b9b4a997b0534bd2a7aa Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Sat, 22 Jun 2024 19:07:39 -0500 Subject: [PATCH] Update uYouPlus.xm --- Sources/uYouPlus.xm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/uYouPlus.xm b/Sources/uYouPlus.xm index 38824db..31787a5 100644 --- a/Sources/uYouPlus.xm +++ b/Sources/uYouPlus.xm @@ -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