Merge pull request #2570 from vector-im/riot_2559

Edits history: Display original event
This commit is contained in:
manuroe 2019-07-10 15:58:41 +02:00 committed by GitHub
commit 47c05e9ce9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {