From a075482b88ba1d4635be528400133b94074c3cb2 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Fri, 22 Mar 2024 16:45:31 -0500 Subject: [PATCH] =?UTF-8?q?Fix=20uYou=E2=80=99s=20Option=20not=20working?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/uYouPlus.xm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/uYouPlus.xm b/Sources/uYouPlus.xm index 8c0b577..ed8cc98 100644 --- a/Sources/uYouPlus.xm +++ b/Sources/uYouPlus.xm @@ -104,7 +104,7 @@ static NSString *accessGroupID() { // Workaround: uYou 3.0.3 Adblock fix. %hook YTSectionListViewController - (void)loadWithModel:(YTISectionListRenderer *)model { - if ([@"removeYouTubeAds" boolValue]) { + if ([NSUserDefaults.standardUserDefaults boolForKey:@"removeYouTubeAds"]) { NSMutableArray *contentsArray = model.contentsArray; NSIndexSet *removeIndexes = [contentsArray indexesOfObjectsPassingTest:^BOOL(YTISectionListSupportedRenderers *renderers, NSUInteger idx, BOOL *stop) { YTIItemSectionRenderer *sectionRenderer = renderers.itemSectionRenderer; @@ -119,7 +119,7 @@ static NSString *accessGroupID() { %hook YTWatchNextResultsViewController - (void)loadWithModel:(YTISectionListRenderer *)watchNextResults { - if ([@"removeYouTubeAds" boolValue]) { + if ([NSUserDefaults.standardUserDefaults boolForKey:@"removeYouTubeAds"]) { NSMutableArray *contentsArray = watchNextResults.contentsArray; NSIndexSet *removeIndexes = [contentsArray indexesOfObjectsPassingTest:^BOOL(YTISectionListSupportedRenderers *renderers, NSUInteger idx, BOOL *stop) { YTIItemSectionRenderer *sectionRenderer = renderers.itemSectionRenderer;