mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Reply rendering (#861)
* Cleanup how we use message timeline items in preparation for rich reply rendering * Expose reply details up to the UI level * Render replies in the timeline (textual for now). Remove now unused AttributedStringBuilderComponent isReply flag. * Move reply detail loading to when the item appears instead of when it's created. * Fix unit tests * Fetch event details also when the reply details are in the error state * Tweaks following code review * Localise emote bodies * Fix replies not loading sometimes, use the current event identifier instead of the one being replied to
This commit is contained in:
@@ -341,7 +341,6 @@ class AttributedStringBuilderTests: XCTestCase {
|
||||
}
|
||||
|
||||
XCTAssertTrue(component.isBlockquote, "The reply quote should be a blockquote.")
|
||||
XCTAssertTrue(component.isReply, "The reply quote should be detected as a reply")
|
||||
}
|
||||
|
||||
func testMultipleGroupedBlockquotes() {
|
||||
@@ -388,9 +387,6 @@ class AttributedStringBuilderTests: XCTestCase {
|
||||
let coalescedComponents = attributedString.formattedComponents
|
||||
|
||||
XCTAssertEqual(coalescedComponents.count, 6)
|
||||
for component in coalescedComponents where component.isReply {
|
||||
XCTFail("None of the blockquotes should be detected as replies.")
|
||||
}
|
||||
|
||||
var numberOfBlockquotes = 0
|
||||
for run in attributedString.runs where run.elementX.blockquote ?? false && run.link != nil {
|
||||
|
||||
Reference in New Issue
Block a user