Fix vector-im/element-x-ios/issues/134 - Prevent home screen room last message attributed string from being computed on every update

Add async/await methods to the AttributedStringBuilder and adopt them throughout the app
This commit is contained in:
Stefan Ceriu
2022-07-22 10:25:17 +03:00
committed by GitHub
parent 2f4fb81aa5
commit e1eee9465e
11 changed files with 147 additions and 89 deletions
@@ -15,7 +15,10 @@ struct AttributedStringBuilderComponent: Hashable {
protocol AttributedStringBuilderProtocol {
func fromPlain(_ string: String?) -> AttributedString?
func fromPlain(_ string: String?) async -> AttributedString?
func fromHTML(_ htmlString: String?) -> AttributedString?
func fromHTML(_ htmlString: String?) async -> AttributedString?
func blockquoteCoalescedComponentsFrom(_ attributedString: AttributedString?) -> [AttributedStringBuilderComponent]?
}