Merge pull request #637 from AtariDreams/Warning-fix
Fix compiler warnings
This commit is contained in:
commit
ce8bea13cf
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue