Skip to content

Commit

Permalink
Edits history: Display original event
Browse files Browse the repository at this point in the history
  • Loading branch information
manuroe committed Jul 10, 2019
1 parent cece040 commit c09faea
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Riot/Modules/Room/EditHistory/EditHistoryViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c09faea

Please sign in to comment.