1
0
mirror of https://github.com/lint/TFDidThatSay synced 2025-06-30 15:06:46 +00:00

Show undeleted text in select mode in Apollo

This commit is contained in:
lint
2020-01-07 21:47:30 -05:00
parent bb0d0d9e95
commit a14dc0bea4

View File

@ -98,6 +98,7 @@ NSDictionary* apolloBodyAttributes = nil;
id authorTextNode = [authorNode subnodes][0];
NSString *author = data[@"author"];
NSString *body = data[@"body"];
id prevAuthorAttributedString = [authorTextNode attributedString];
NSDictionary *authorStringAttributes = [prevAuthorAttributedString attributesAtIndex:0 longestEffectiveRange:nil inRange:NSMakeRange(0, [prevAuthorAttributedString length])];
@ -106,10 +107,11 @@ NSDictionary* apolloBodyAttributes = nil;
[authorTextNode setAttributedText:newAuthorAttributedString];
[authorTextNode setAttributedString:newAuthorAttributedString];
[bodyNode setAttributedString:[%c(MarkdownRenderer) attributedStringFromMarkdown:body withAttributes:apolloBodyAttributes]];
[comment setAuthor:author];
[bodyNode setAttributedString:[%c(MarkdownRenderer) attributedStringFromMarkdown:data[@"body"] withAttributes:apolloBodyAttributes]];
[comment setBody:body];
[data[@"sender"] setEnabled:YES];
}