Fix flickering (thanks Matrix spec)

This commit is contained in:
Danila Fedorin 2019-09-08 14:22:08 -07:00
parent 3b1dabd624
commit 266c421223

View File

@ -345,7 +345,9 @@ updateSyncResponse model r notify =
(Just rid, Just re) -> setReadMarkers model.apiUrl token rid re.eventId <| Just re.eventId (Just rid, Just re) -> setReadMarkers model.apiUrl token rid re.eventId <| Just re.eventId
_ -> Cmd.none _ -> Cmd.none
receivedEvents sr = List.map Just <| allTimelineEventIds sr receivedEvents sr = List.map Just <| allTimelineEventIds sr
sending sr = Dict.filter (\_ (rid, { body, id }) -> not <| List.member id <| receivedEvents sr) model.sending receivedTransactions sr = List.filterMap (Maybe.andThen .transactionId << .unsigned)
<| allTimelineEvents sr
sending sr = Dict.filter (\tid (rid, { body, id }) -> not <| List.member (String.fromInt tid) <| receivedTransactions sr) model.sending
newSync sr = mergeSyncResponse model.sync sr newSync sr = mergeSyncResponse model.sync sr
newModel sr = newModel sr =
{ model | sync = newSync sr { model | sync = newSync sr