Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read receipts are increasingly broken #11496

Closed
turt2live opened this issue Nov 25, 2019 · 1 comment · Fixed by matrix-org/matrix-react-sdk#3688
Closed

Read receipts are increasingly broken #11496

turt2live opened this issue Nov 25, 2019 · 1 comment · Fixed by matrix-org/matrix-react-sdk#3688
Assignees

Comments

@turt2live
Copy link
Member

Dave just flew from the heavens despite having read the message immediately prior

@turt2live turt2live self-assigned this Nov 25, 2019
turt2live added a commit to matrix-org/matrix-react-sdk that referenced this issue Nov 29, 2019
Fixes element-hq/element-web#11496
Fixes element-hq/element-web#11385
Fixes element-hq/element-web#10007
Fixes element-hq/element-web#9769

React does (kinda) bind `this._isUnmounting` for us in the context of the EventTile, but the EventTile then passes the function straight through to the ReadReceiptMarker component, which then binds it in the context of EventTile. This results in `this._mounted` being falsey all the time, preventing the ReadReceiptMarker from hitting the code where it updates rrInfo in its unmount. 

The velocity stuff is smart enough to realize that it has a read receipt and shuffles everything over by one, but when it goes to check the starting height (which will be null/undefined because the RRMarker didn't update it) it assumes it has never seen the receipt before and appends it again - this is what causes some holes/stacking.

By forcefully binding the `this._isUnmounting` function we ensure that the `this._mounted` variable is correctly referenced in the context of the MessagePanel, allowing the RRMarker to update its position, and therefore allowing the velocity behaviour to be consistent.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant