From ee5db96c9eb9559529201e96f4323cf4896005a0 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sun, 2 Jul 2023 09:46:17 -0700 Subject: [PATCH] Workaround for links using the wrong tint color Closes #402 --- Tusker/Views/ContentTextView.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Tusker/Views/ContentTextView.swift b/Tusker/Views/ContentTextView.swift index c3187ed6..f4136855 100644 --- a/Tusker/Views/ContentTextView.swift +++ b/Tusker/Views/ContentTextView.swift @@ -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) }