diff --git a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentViewModel+Upload.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentViewModel+Upload.swift index e26e97d35..4f99f0ba1 100644 --- a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentViewModel+Upload.swift +++ b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentViewModel+Upload.swift @@ -199,7 +199,7 @@ extension AttachmentViewModel { } else { AttachmentViewModel.logger.log(level: .debug, "\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): attachment processing. Retry \(waitProcessRetryCount)/\(waitProcessRetryLimit)") - await Task.sleep(1_000_000_000 * 3) // 3s + try await Task.sleep(nanoseconds: 1_000_000_000 * 3) // 3s } } while waitProcessRetryCount < waitProcessRetryLimit diff --git a/MastodonSDK/Sources/MastodonUI/View/Content/StatusView+ViewModel.swift b/MastodonSDK/Sources/MastodonUI/View/Content/StatusView+ViewModel.swift index fa16e50e0..b4430dd8e 100644 --- a/MastodonSDK/Sources/MastodonUI/View/Content/StatusView+ViewModel.swift +++ b/MastodonSDK/Sources/MastodonUI/View/Content/StatusView+ViewModel.swift @@ -304,9 +304,14 @@ extension StatusView.ViewModel { } let paragraphStyle = statusView.contentMetaText.paragraphStyle - if let language = language { - let direction = Locale.characterDirection(forLanguage: language) - paragraphStyle.alignment = direction == .rightToLeft ? .right : .left + if let language = language { + if #available(iOS 16, *) { + let direction = Locale.Language(identifier: language).characterDirection + paragraphStyle.alignment = direction == .rightToLeft ? .right : .left + } else { + let direction = Locale.characterDirection(forLanguage: language) + paragraphStyle.alignment = direction == .rightToLeft ? .right : .left + }; } else { paragraphStyle.alignment = .natural }