From 57fffa7fc7082848722ff7fb6298469fdc2e3ab9 Mon Sep 17 00:00:00 2001 From: Doug <6060466+pixlwave@users.noreply.github.com> Date: Fri, 3 May 2024 19:45:28 +0100 Subject: [PATCH] Fix the font when editing a message with RTE off. (#2779) Co-authored-by: Mauro <34335419+Velin92@users.noreply.github.com> --- .../ComposerToolbar/View/MessageComposerTextField.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ElementX/Sources/Screens/RoomScreen/ComposerToolbar/View/MessageComposerTextField.swift b/ElementX/Sources/Screens/RoomScreen/ComposerToolbar/View/MessageComposerTextField.swift index 98c6606b2..77f25b7ef 100644 --- a/ElementX/Sources/Screens/RoomScreen/ComposerToolbar/View/MessageComposerTextField.swift +++ b/ElementX/Sources/Screens/RoomScreen/ComposerToolbar/View/MessageComposerTextField.swift @@ -95,6 +95,10 @@ private struct UITextViewWrapper: UIViewRepresentable { if textView.attributedText != text { textView.attributedText = text + // Re-apply the default font when setting text for e.g. edits. + textView.font = font + textView.textColor = .compound.textPrimary + // Prevent the textView from randomly using the tint color textView.typingAttributes = [.font: font, .foregroundColor: UIColor(.compound.textPrimary)]