Workaround for links using the wrong tint color

Closes #402
This commit is contained in:
Shadowfacts 2023-07-02 09:46:17 -07:00
parent f825760fe9
commit ee5db96c9e
1 changed files with 6 additions and 0 deletions

View File

@ -94,6 +94,12 @@ class ContentTextView: LinkTextView, BaseEmojiLabel {
// MARK: - HTML Parsing
func setTextFromHtml(_ html: String) {
// this shouldn't be necessary, but sometimes when the text view is updated before
// being added to the view hierarchy, it doesn't get tintColorDidChange calld
// when it's actually added, so links have the wrong color
// see #402
self.tintColor = Preferences.shared.accentColor.color
self.attributedText = htmlConverter.convert(html)
}