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 {
|
} else {
|
||||||
AttachmentViewModel.logger.log(level: .debug, "\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): attachment processing. Retry \(waitProcessRetryCount)/\(waitProcessRetryLimit)")
|
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
|
} while waitProcessRetryCount < waitProcessRetryLimit
|
||||||
|
|
||||||
|
@ -305,8 +305,13 @@ extension StatusView.ViewModel {
|
|||||||
|
|
||||||
let paragraphStyle = statusView.contentMetaText.paragraphStyle
|
let paragraphStyle = statusView.contentMetaText.paragraphStyle
|
||||||
if let language = language {
|
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)
|
let direction = Locale.characterDirection(forLanguage: language)
|
||||||
paragraphStyle.alignment = direction == .rightToLeft ? .right : .left
|
paragraphStyle.alignment = direction == .rightToLeft ? .right : .left
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
paragraphStyle.alignment = .natural
|
paragraphStyle.alignment = .natural
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user