mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
Merge pull request #2570 from vector-im/riot_2559
Edits history: Display original event
This commit is contained in:
commit
47c05e9ce9
1 changed files with 9 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue