Remove temp events only on confirmed sync
parent
290be4e746
commit
2769685c13
|
@ -87,7 +87,14 @@ addEvents ({ events } as data) (IRoom room) =
|
||||||
{ room
|
{ room
|
||||||
| events = List.foldl Hashdict.insert room.events events
|
| events = List.foldl Hashdict.insert room.events events
|
||||||
, timeline = Timeline.addNewEvents data room.timeline
|
, timeline = Timeline.addNewEvents data room.timeline
|
||||||
, tempEvents = []
|
, tempEvents =
|
||||||
|
List.filter
|
||||||
|
(\tempEvent ->
|
||||||
|
List.member
|
||||||
|
(IEvent.eventId tempEvent)
|
||||||
|
(List.map IEvent.eventId events)
|
||||||
|
)
|
||||||
|
room.tempEvents
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue