Edits history: Display original event

#2559
This commit is contained in:
manuroe
2019-07-10 08:20:05 +02:00
parent de7b708d3b
commit b683afce03
@@ -114,6 +114,15 @@ final class EditHistoryViewModel: EditHistoryViewModelType {
sself.operation = nil
sself.process(editEvents: response.chunk)
if response.nextBatch == nil {
// Append the original event when hitting the end of the edits history
if let originalEvent = response.originalEvent {
sself.process(editEvents: [originalEvent])
} else {
print("[EditHistoryViewModel] loadMoreHistory: The homeserver did not return the original event")
}
}
}, failure: { [weak self] error in
guard let sself = self else {