From a14dc0bea47dbe758f78bec387b490ecb6a98e18 Mon Sep 17 00:00:00 2001 From: lint <47455468+lint@users.noreply.github.com> Date: Tue, 7 Jan 2020 21:47:30 -0500 Subject: [PATCH] Show undeleted text in select mode in Apollo --- tweak/Apollo.xm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tweak/Apollo.xm b/tweak/Apollo.xm index ee13cfc..f331f9c 100644 --- a/tweak/Apollo.xm +++ b/tweak/Apollo.xm @@ -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]; }