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:
Stefan Ceriu
2023-05-09 16:09:38 +03:00
committed by GitHub
parent 483d261504
commit 1bd6e461ed
48 changed files with 889 additions and 733 deletions
@@ -838,6 +838,22 @@ class RoomProxyMock: RoomProxyProtocol {
return acceptInvitationReturnValue
}
}
//MARK: - fetchDetails
var fetchDetailsForCallsCount = 0
var fetchDetailsForCalled: Bool {
return fetchDetailsForCallsCount > 0
}
var fetchDetailsForReceivedEventID: String?
var fetchDetailsForReceivedInvocations: [String] = []
var fetchDetailsForClosure: ((String) -> Void)?
func fetchDetails(for eventID: String) {
fetchDetailsForCallsCount += 1
fetchDetailsForReceivedEventID = eventID
fetchDetailsForReceivedInvocations.append(eventID)
fetchDetailsForClosure?(eventID)
}
}
class SessionVerificationControllerProxyMock: SessionVerificationControllerProxyProtocol {
var callbacks: PassthroughSubject<SessionVerificationControllerProxyCallback, Never> {