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 stack on top of each other #11385

Closed
turt2live opened this issue Nov 14, 2019 · 2 comments · Fixed by matrix-org/matrix-react-sdk#3688
Closed

read receipts stack on top of each other #11385

turt2live opened this issue Nov 14, 2019 · 2 comments · Fixed by matrix-org/matrix-react-sdk#3688

Comments

@turt2live
Copy link
Member

this is a regression

@jryans
Copy link
Collaborator

jryans commented Nov 14, 2019

Duplicate of #10007 or #9769?

@turt2live
Copy link
Member Author

This is technically a duplicate of both of those, though since the last release it has gotten significantly worse and happening every time.

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants