Resolve some errors? (uYouPlus.xm)
This commit is contained in:
parent
15af3980f0
commit
6936a8fb2b
1 changed files with 11 additions and 2 deletions
13
uYouPlus.xm
13
uYouPlus.xm
|
|
@ -784,6 +784,9 @@ static void replaceTab(YTIGuideResponse *response) {
|
||||||
|
|
||||||
NSString *result = [[[[asCell node] accessibilityElements] valueForKey:@"description"] componentsJoinedByString:@""];
|
NSString *result = [[[[asCell node] accessibilityElements] valueForKey:@"description"] componentsJoinedByString:@""];
|
||||||
|
|
||||||
|
if ([cell respondsToSelector:@selector(node)]) {
|
||||||
|
NSString *idToRemove = [[cell node] accessibilityIdentifier];
|
||||||
|
|
||||||
// Hide the Comment Section under the Video Player (2) - @arichorn
|
// Hide the Comment Section under the Video Player (2) - @arichorn
|
||||||
if (IsEnabled(@"hideCommentSection_enabled") && [result rangeOfString:@"id.ui.comments_entry_point_teaser"].location != NSNotFound) {
|
if (IsEnabled(@"hideCommentSection_enabled") && [result rangeOfString:@"id.ui.comments_entry_point_teaser"].location != NSNotFound) {
|
||||||
[self deleteItemsAtIndexPaths:@[indexPath]];
|
[self deleteItemsAtIndexPaths:@[indexPath]];
|
||||||
|
|
@ -810,8 +813,14 @@ static void replaceTab(YTIGuideResponse *response) {
|
||||||
%hook _ASDisplayView
|
%hook _ASDisplayView
|
||||||
- (id)initWithElement:(ELMElement *)element {
|
- (id)initWithElement:(ELMElement *)element {
|
||||||
id result = %orig;
|
id result = %orig;
|
||||||
if (IsEnabled(@"hideAddToOfflineButton_enabled") && ([element respondsToSelector:@selector(identifier)] && [[element identifier] isEqualToString:@"id.ui.add_to.offline.button"]) {
|
if (IsEnabled(@"hideAddToOfflineButton_enabled")) {
|
||||||
[result setHidden:YES];
|
SEL identifierSelector = NSSelectorFromString(@"identifier");
|
||||||
|
if ([element respondsToSelector:identifierSelector]) {
|
||||||
|
NSString *identifier = [element performSelector:identifierSelector];
|
||||||
|
if ([identifier isEqualToString:@"id.ui.add_to.offline.button"]) {
|
||||||
|
[result setHidden:YES];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue