Fix post text in darkmode

Closes: #693
This commit is contained in:
Swift
2023-02-24 18:56:00 -05:00
committed by William Casarin
parent 71f7ea47df
commit 75fd8de456
2 changed files with 2 additions and 1 deletions

View File

@@ -55,6 +55,7 @@ struct UserSearch: View {
attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 18.0),
NSAttributedString.Key.link: "@\(pk)"])
tagAttributedString.removeAttribute(.link, range: NSRange(location: tagAttributedString.length - 2, length: 2))
tagAttributedString.addAttributes([NSAttributedString.Key.foregroundColor: UIColor.label], range: NSRange(location: tagAttributedString.length - 2, length: 2))
let mutableString = NSMutableAttributedString()
mutableString.append(post)
mutableString.append(tagAttributedString)

View File

@@ -14,7 +14,7 @@ struct TextViewWrapper: UIViewRepresentable {
let textView = UITextView()
textView.delegate = context.coordinator
textView.font = UIFont.systemFont(ofSize: 18)
//textView.textColor = UIColor.black
textView.textColor = UIColor.label
let linkAttributes: [NSAttributedString.Key : Any] = [
NSAttributedString.Key.foregroundColor: UIColor(Color.accentColor)]
textView.linkTextAttributes = linkAttributes