Skip to content

Commit

Permalink
fix: Add text transition even when text doesn't change
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinperignon committed Oct 9, 2023
1 parent fa90196 commit cfc80a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Mail/Views/Thread/SelectableTextView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ struct SelectableTextView: UIViewRepresentable {
}

func updateUIView(_ uiView: UITextView, context: Context) {
if !uiView.text.isEmpty && style == .standard && uiView.textColor != style.foregroundColor {
// Replace text when the style is standard and the current color has not yet been changed
if style == .standard && uiView.textColor != style.foregroundColor {
replaceText(text: text ?? "", in: uiView)
} else {
insertText(text: text ?? "", in: uiView)
Expand Down

0 comments on commit cfc80a6

Please sign in to comment.