mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 15:45:11 +00:00
Prevent the textView from inheriting attributes from mention pills
This commit is contained in:
committed by
Stefan Ceriu
parent
17b79c1e80
commit
5a28532e90
+4
-4
@@ -88,6 +88,10 @@ private struct UITextViewWrapper: UIViewRepresentable {
|
||||
}
|
||||
|
||||
func updateUIView(_ textView: UITextView, context: UIViewRepresentableContext<UITextViewWrapper>) {
|
||||
// Prevent the textView from inheriting attributes from mention pills
|
||||
textView.typingAttributes = [.font: font,
|
||||
.foregroundColor: UIColor(.compound.textPrimary)]
|
||||
|
||||
if textView.attributedText != text {
|
||||
textView.attributedText = text
|
||||
|
||||
@@ -95,10 +99,6 @@ private struct UITextViewWrapper: UIViewRepresentable {
|
||||
textView.font = font
|
||||
textView.textColor = .compound.textPrimary
|
||||
|
||||
// Prevent the textView from randomly using the tint color
|
||||
textView.typingAttributes = [.font: font,
|
||||
.foregroundColor: UIColor(.compound.textPrimary)]
|
||||
|
||||
if text.string.isEmpty {
|
||||
// text cleared, probably because the written text is sent
|
||||
// reload keyboard type
|
||||
|
||||
Reference in New Issue
Block a user