diff --git a/Mastodon/Diffiable/Section/Status/StatusSection.swift b/Mastodon/Diffiable/Section/Status/StatusSection.swift index fe95c4c7..68242292 100644 --- a/Mastodon/Diffiable/Section/Status/StatusSection.swift +++ b/Mastodon/Diffiable/Section/Status/StatusSection.swift @@ -720,6 +720,15 @@ extension StatusSection { statusItemAttribute: Item.StatusAttribute ) { // set content + let paragraphStyle = cell.statusView.contentMetaText.paragraphStyle + if let language = (status.reblog ?? status).language { + let direction = Locale.characterDirection(forLanguage: language) + paragraphStyle.alignment = direction == .rightToLeft ? .right : .left + } else { + paragraphStyle.alignment = .natural + } + cell.statusView.contentMetaText.paragraphStyle = paragraphStyle + if let content = content { cell.statusView.contentMetaText.configure(content: content) cell.statusView.contentMetaText.textView.accessibilityLabel = content.trimmed diff --git a/Mastodon/Scene/Share/View/Content/StatusView.swift b/Mastodon/Scene/Share/View/Content/StatusView.swift index 7afabd3a..9a6907d1 100644 --- a/Mastodon/Scene/Share/View/Content/StatusView.swift +++ b/Mastodon/Scene/Share/View/Content/StatusView.swift @@ -217,6 +217,7 @@ final class StatusView: UIView { let style = NSMutableParagraphStyle() style.lineSpacing = 5 style.paragraphSpacing = 8 + style.alignment = .natural return style }() metaText.textAttributes = [