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

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