Skip to content

Commit 6e33b3a

Browse files
committed
Fix the text. 🛠
1 parent 88b3323 commit 6e33b3a

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

‎FixCode/FixCode.m‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,23 @@ - (NSButton*)findFirstButtonRecursive:(NSView*)view {
8383
return nil;
8484
}
8585

86+
- (NSTextField*)findLastTextFieldRecursive:(NSView*)view {
87+
NSTextField* textField = nil;
88+
89+
for (NSView* subview in view.subviews) {
90+
if ([subview isKindOfClass:NSTextField.class]) {
91+
textField = (NSTextField*)subview;
92+
}
93+
94+
NSTextField* result = [self findLastTextFieldRecursive:subview];
95+
if (result) {
96+
return result;
97+
}
98+
}
99+
100+
return textField;
101+
}
102+
86103
- (void)swizzleCodeSigningResolution
87104
{
88105
NSError* error = nil;
@@ -96,6 +113,9 @@ - (void)swizzleCodeSigningResolution
96113

97114
fixIssueButton.action = @selector(doItRight);
98115
fixIssueButton.target = self;
116+
117+
NSTextField* field = [self findLastTextFieldRecursive:contentView];
118+
[field setStringValue:[field.stringValue componentsSeparatedByString:@"\n"][0]];
99119
} error:&error];
100120

101121
if (error) {

0 commit comments

Comments
 (0)