Fix various small warnings

This commit is contained in:
Stefan Ceriu
2024-01-04 12:39:15 +02:00
committed by Stefan Ceriu
parent 2a33ee1f63
commit b5be6639d1
3 changed files with 5 additions and 6 deletions
@@ -157,12 +157,13 @@ struct FormattedBodyText: View {
}
private var blockquoteAttributes: AttributeContainer {
var container = AttributeContainer()
// The paragraph style removes the block style paragraph that the parser adds by default
// Set directly in the constructor to avoid `Conformance to 'Sendable'` warnings
var container = AttributeContainer([.paragraphStyle: NSParagraphStyle.default])
// Sadly setting SwiftUI fonts do not work so we would need UIFont equivalents for compound, this one is bodyMD
container.font = UIFont.preferredFont(forTextStyle: .subheadline)
container.foregroundColor = UIColor.compound.textSecondary
// To remove the block style paragraph that the parser adds by default
container.paragraphStyle = .default
return container
}
}