Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Send read marker updates immediately after moving visually #4755

Merged
merged 1 commit into from
Jun 12, 2020

Conversation

jryans
Copy link
Collaborator

@jryans jryans commented Jun 12, 2020

The TimelinePanel uses two timers to coordinate read marker and read receipt
updates. When the read receipt timer fires, we advance the receipt and send the
latest state of both your receipt and marker to the server. When the read marker
timer fires, we advance the marker visually, but do not send anything to the
server: we were relying on the slightly different schedule of the read receipt
to actually send the updated read marker. This means there's a time window where
it's possible to visually advance the read marker without ever sending it to the
server (if you change rooms before the receipt timer fires again).

To simplify the behaviour here and ensure we always commit the updated marker
when we move it, this change sends an update to the server at the same time as
moving the marker.

It's possible this may improve some of the behaviour reported in element-hq/element-web#12338.

@jryans jryans requested a review from a team June 12, 2020 13:33
The `TimelinePanel` uses two timers to coordinate read marker and read receipt
updates. When the read receipt timer fires, we advance the receipt and send the
latest state of both your receipt and marker to the server. When the read marker
timer fires, we advance the marker visually, but do not send anything to the
server: we were relying on the slightly different schedule of the read receipt
to actually send the updated read marker. This means there's a time window where
it's possible to visually advance the read marker without ever sending it to the
server (if you change rooms before the receipt timer fires again).

To simplify the behaviour here and ensure we always commit the updated marker
when we move it, this change sends an update to the server at the same time as
moving the marker.

It's possible this may improve some of the behaviour reported in
element-hq/element-web#12338.
@jryans jryans force-pushed the jryans/send-read-marker-immed branch from a97b6b0 to 39c28e2 Compare June 12, 2020 13:35
@jryans jryans merged commit de003bc into develop Jun 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants