Fix / move read receipt on m.replace events

This commit is contained in:
Valere 2019-06-04 17:14:12 +02:00
parent ecccb80e04
commit adbfde94d6
1 changed files with 6 additions and 0 deletions

View File

@ -350,6 +350,12 @@ class RoomDetailViewModel(initialState: RoomDetailViewState,

private fun handleEventDisplayed(action: RoomDetailActions.EventDisplayed) {
displayedEventsObservable.accept(action)
//We need to update this with the related m.replace also (to move read receipt)
action.event.annotations?.editSummary?.sourceEvents?.forEach {
room.getTimeLineEvent(it)?.let {event ->
displayedEventsObservable.accept(RoomDetailActions.EventDisplayed(event))
}
}
}

private fun handleLoadMore(action: RoomDetailActions.LoadMore) {