mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-06 04:18:31 +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>) {
|
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 {
|
if textView.attributedText != text {
|
||||||
textView.attributedText = text
|
textView.attributedText = text
|
||||||
|
|
||||||
@@ -95,10 +99,6 @@ private struct UITextViewWrapper: UIViewRepresentable {
|
|||||||
textView.font = font
|
textView.font = font
|
||||||
textView.textColor = .compound.textPrimary
|
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 {
|
if text.string.isEmpty {
|
||||||
// text cleared, probably because the written text is sent
|
// text cleared, probably because the written text is sent
|
||||||
// reload keyboard type
|
// reload keyboard type
|
||||||
|
|||||||
Reference in New Issue
Block a user