mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-04-21 07:41:59 +00:00
Fix uYou’s Option not working
This commit is contained in:
parent
7121401d23
commit
a075482b88
1 changed files with 2 additions and 2 deletions
|
|
@ -104,7 +104,7 @@ static NSString *accessGroupID() {
|
||||||
// Workaround: uYou 3.0.3 Adblock fix.
|
// Workaround: uYou 3.0.3 Adblock fix.
|
||||||
%hook YTSectionListViewController
|
%hook YTSectionListViewController
|
||||||
- (void)loadWithModel:(YTISectionListRenderer *)model {
|
- (void)loadWithModel:(YTISectionListRenderer *)model {
|
||||||
if ([@"removeYouTubeAds" boolValue]) {
|
if ([NSUserDefaults.standardUserDefaults boolForKey:@"removeYouTubeAds"]) {
|
||||||
NSMutableArray <YTISectionListSupportedRenderers *> *contentsArray = model.contentsArray;
|
NSMutableArray <YTISectionListSupportedRenderers *> *contentsArray = model.contentsArray;
|
||||||
NSIndexSet *removeIndexes = [contentsArray indexesOfObjectsPassingTest:^BOOL(YTISectionListSupportedRenderers *renderers, NSUInteger idx, BOOL *stop) {
|
NSIndexSet *removeIndexes = [contentsArray indexesOfObjectsPassingTest:^BOOL(YTISectionListSupportedRenderers *renderers, NSUInteger idx, BOOL *stop) {
|
||||||
YTIItemSectionRenderer *sectionRenderer = renderers.itemSectionRenderer;
|
YTIItemSectionRenderer *sectionRenderer = renderers.itemSectionRenderer;
|
||||||
|
|
@ -119,7 +119,7 @@ static NSString *accessGroupID() {
|
||||||
|
|
||||||
%hook YTWatchNextResultsViewController
|
%hook YTWatchNextResultsViewController
|
||||||
- (void)loadWithModel:(YTISectionListRenderer *)watchNextResults {
|
- (void)loadWithModel:(YTISectionListRenderer *)watchNextResults {
|
||||||
if ([@"removeYouTubeAds" boolValue]) {
|
if ([NSUserDefaults.standardUserDefaults boolForKey:@"removeYouTubeAds"]) {
|
||||||
NSMutableArray <YTISectionListSupportedRenderers *> *contentsArray = watchNextResults.contentsArray;
|
NSMutableArray <YTISectionListSupportedRenderers *> *contentsArray = watchNextResults.contentsArray;
|
||||||
NSIndexSet *removeIndexes = [contentsArray indexesOfObjectsPassingTest:^BOOL(YTISectionListSupportedRenderers *renderers, NSUInteger idx, BOOL *stop) {
|
NSIndexSet *removeIndexes = [contentsArray indexesOfObjectsPassingTest:^BOOL(YTISectionListSupportedRenderers *renderers, NSUInteger idx, BOOL *stop) {
|
||||||
YTIItemSectionRenderer *sectionRenderer = renderers.itemSectionRenderer;
|
YTIItemSectionRenderer *sectionRenderer = renderers.itemSectionRenderer;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue