mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Fix for overlapping timestamp when last block is not plainText (#5629)
* fix for the overlapping timestamp when the last block is not plain text * remove id and use offset as iterator in the foearch of the components
This commit is contained in:
@@ -37,8 +37,7 @@ extension AttributedString {
|
||||
.plainText
|
||||
}
|
||||
|
||||
components.append(AttributedStringBuilderComponent(id: String(attributedString.characters),
|
||||
attributedString: attributedString,
|
||||
components.append(AttributedStringBuilderComponent(attributedString: attributedString,
|
||||
type: componentType))
|
||||
}
|
||||
|
||||
|
||||
@@ -8,14 +8,13 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
struct AttributedStringBuilderComponent: Hashable, Identifiable {
|
||||
struct AttributedStringBuilderComponent: Hashable {
|
||||
enum ComponentType {
|
||||
case plainText
|
||||
case blockquote
|
||||
case codeBlock
|
||||
}
|
||||
|
||||
let id: String
|
||||
|
||||
let attributedString: AttributedString
|
||||
let type: ComponentType
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user