瀏覽代碼

Show undeleted text in select mode in Apollo

master
lint 4 年之前
父節點
當前提交
a14dc0bea4
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. +5
    -3
      tweak/Apollo.xm

+ 5
- 3
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];
[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];
}

Loading…
取消
儲存