UI tests updated

This commit is contained in:
Mauro Romito
2026-05-11 19:30:59 +02:00
committed by Mauro
parent 8318198601
commit d60f5d6efb
41 changed files with 86 additions and 83 deletions
@@ -119,11 +119,14 @@ struct MessageText: UIViewRepresentable {
let string = attributedText.string as NSString
guard string.length > 0 else { return true }
// Isolate the last paragraph because its direction is what decides
// which side the trailing attachment ends up on.
let lastParagraphRange = string.paragraphRange(for: NSRange(location: string.length - 1, length: 0))
let lastParagraph = string.substring(with: lastParagraphRange)
let textIsRTL = lastParagraph.firstStrongCharacterIsRTL
return textIsRTL == (layoutDirection == .rightToLeft)
let layoutIsRTL = layoutDirection == .rightToLeft
return textIsRTL == layoutIsRTL
}
func makeUIView(context: Context) -> MessageTextView {