Skip to content

Commit 74baf84

Browse files
committed
2.6.1
1 parent 3e67c85 commit 74baf84

7 files changed

Lines changed: 36 additions & 24 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ endif
55
DEBUG=0
66
FINALPACKAGE=1
77
ARCHS = arm64
8-
PACKAGE_VERSION = 2.6
8+
PACKAGE_VERSION = 2.6.1
99
TARGET := iphone:clang:latest:13.0
1010

1111
include $(THEOS)/makefiles/common.mk

YTLite.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ int kPivotIndex;
290290

291291
@interface ASDisplayNode : NSObject
292292
@property (atomic, assign, readonly) ASNodeAncestryEnumerator *supernodes;
293+
@property (atomic, copy, readwrite) NSArray *yogaChildren;
293294
@end
294295

295296
@interface ELMContainerNode : ASDisplayNode

YTLite.x

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,26 @@ static BOOL isOverlayShown = YES;
641641
%property (nonatomic, strong) NSString *copiedComment;
642642
%end
643643

644+
%hook ASDisplayNode
645+
- (void)didLoad {
646+
%orig;
647+
648+
ASTextNode *textNode = (ASTextNode *)self;
649+
650+
if (kCopyCommentText && [[self valueForKey:@"_accessibilityIdentifier"] isEqualToString:@"id.comment.content.label"]) {
651+
NSString *comment = textNode.attributedText.string;
652+
653+
NSMutableArray *allObjects = self.supernodes.allObjects;
654+
for (ELMContainerNode *containerNode in allObjects) {
655+
if ([containerNode.description containsString:@"id.ui.comment_cell"] && comment) {
656+
containerNode.copiedComment = comment;
657+
break;
658+
}
659+
}
660+
}
661+
}
662+
%end
663+
644664
%hook _ASDisplayView
645665
- (void)setKeepalive_node:(id)arg1 {
646666
%orig;
@@ -662,19 +682,6 @@ static BOOL isOverlayShown = YES;
662682
break;
663683
}
664684
}
665-
666-
if ([[self description] containsString:@"id.comment.content.label"]) {
667-
ASTextNode *textNode = (ASTextNode *)self.keepalive_node;
668-
ASDisplayNode *displayNode = (ASDisplayNode *)self.keepalive_node;
669-
670-
NSMutableArray *allObjects = displayNode.supernodes.allObjects;
671-
for (ELMContainerNode *containerNode in allObjects) {
672-
if ([containerNode.description containsString:@"id.ui.comment_cell"]) {
673-
containerNode.copiedComment = textNode.attributedText.string;
674-
break;
675-
}
676-
}
677-
}
678685
}
679686

680687
%new
@@ -764,11 +771,15 @@ static BOOL isOverlayShown = YES;
764771
- (void)copyComment:(UILongPressGestureRecognizer *)sender {
765772
if (sender.state == UIGestureRecognizerStateBegan) {
766773
ELMContainerNode *containerNode = (ELMContainerNode *)self.keepalive_node;
767-
[UIPasteboard generalPasteboard].string = containerNode.copiedComment;
774+
NSString *comment = containerNode.copiedComment;
768775

769-
UIResponder *responder = self.nextResponder;
770-
while (responder && ![responder isKindOfClass:[UIViewController class]]) responder = responder.nextResponder;
771-
if (responder) [[%c(YTToastResponderEvent) eventWithMessage:LOC(@"Copied") firstResponder:responder] send];
776+
if (comment) {
777+
[UIPasteboard generalPasteboard].string = comment;
778+
779+
UIResponder *responder = self.nextResponder;
780+
while (responder && ![responder isKindOfClass:[UIViewController class]]) responder = responder.nextResponder;
781+
if (responder) [[%c(YTToastResponderEvent) eventWithMessage:LOC(@"Copied") firstResponder:responder] send];
782+
}
772783
}
773784
}
774785
%end
@@ -901,7 +912,7 @@ BOOL isTabSelected = NO;
901912
- (void)layoutSubviews {
902913
%orig;
903914

904-
if ([self.panelIdentifier.identifierString isEqualToString:@"video-description-ep-identifier"]) {
915+
if (kCopyVideoInfo && [self.panelIdentifier.identifierString isEqualToString:@"video-description-ep-identifier"]) {
905916
YTQTMButton *copyInfoButton = [%c(YTQTMButton) iconButton];
906917
copyInfoButton.accessibilityLabel = LOC(@"CopyVideoInfo");
907918
[copyInfoButton setTag:999];
@@ -911,12 +922,12 @@ BOOL isTabSelected = NO;
911922
[copyInfoButton setTranslatesAutoresizingMaskIntoConstraints:false];
912923
[copyInfoButton addTarget:self action:@selector(didTapCopyInfoButton:) forControlEvents:UIControlEventTouchUpInside];
913924

914-
if (kCopyVideoInfo && self.headerView && self.headerView.closeButton && ![self.headerView viewWithTag:999]) {
925+
if (self.headerView && ![self.headerView viewWithTag:999]) {
915926
[self.headerView addSubview:copyInfoButton];
916927

917928
[NSLayoutConstraint activateConstraints:@[
918-
[copyInfoButton.trailingAnchor constraintEqualToAnchor:self.headerView.closeButton.leadingAnchor],
919-
[copyInfoButton.centerYAnchor constraintEqualToAnchor:self.headerView.closeButton.centerYAnchor],
929+
[copyInfoButton.trailingAnchor constraintEqualToAnchor:self.headerView.trailingAnchor constant:-48],
930+
[copyInfoButton.centerYAnchor constraintEqualToAnchor:self.headerView.centerYAnchor],
920931
[copyInfoButton.widthAnchor constraintEqualToConstant:40.0],
921932
[copyInfoButton.heightAnchor constraintEqualToConstant:40.0],
922933
]];

layout/Library/Application Support/YTLite.bundle/fr.lproj/Localizable.strings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@
192192
"French" = "Localisation française";
193193
"Spanish" = "Localisation espagnole";
194194
"Japanese" = "Localisation japonaise";
195-
"Vietnamese" = "Vietnamese localization";
195+
"Vietnamese" = "Localisation vietnamienne";
196196
"Advanced" = "Mode avancé";
197197
"AdvancedModeReminder" = "Voulez-vous activer le mode avancé pour YTLite ?\n\nCe mode offre plus de 50 options supplémentaires pour personnaliser et optimiser votre expérience YouTube. Vous pouvez l'activer/désactiver ultérieurement depuis Paramètres → %@ → %@ → %@.";
198198
"ClearCache" = "Effacer le cache";

layout/Library/Application Support/YTLite.bundle/ru.lproj/Localizable.strings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@
192192
"French" = "Французская локализация";
193193
"Spanish" = "Испанская локализация";
194194
"Japanese" = "Японская локализация";
195-
"Vietnamese" = "Vietnamese localization";
195+
"Vietnamese" = "Вьетнамская локализация";
196196
"Advanced" = "Расширенный режим";
197197
"AdvancedModeReminder" = "Хотите ли вы активировать расширенный режим настроек YTLite?\n\nДанный режим добавляет более 50 опций для тонкой настройки YouTube. Вы всегда сможете включить/отключить расширенный режим перейдя в Настройки → %@ → %@ → %@.";
198198
"ClearCache" = "Очистить кеш";
68.3 KB
Binary file not shown.
68.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)