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