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

Commit

Permalink
Restore read receipt animation from event to event
Browse files Browse the repository at this point in the history
This restores expected read receipt animation by always including the positioned
parent of read receipts. I imagine there's something smarter we could be doing,
but for now, at least least get back to expected behaviour.

Fixes element-hq/element-web#17561
  • Loading branch information
jryans committed Jun 9, 2021
1 parent 8334a2b commit b43315c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/components/views/rooms/EventTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,18 @@ export default class EventTile extends React.Component<IProps, IState> {

// return early if there are no read receipts
if (!this.props.readReceipts || this.props.readReceipts.length === 0) {
return null;
// We currently must include `mx_EventTile_readAvatars` in the DOM
// of all events, as it is the positioned parent of the animated
// read receipts. We can't let it unmount when a receipt moves
// events, so for now we mount it for all events. With out it, the
// animation will start from the top of the timeline (because it
// lost its container).
// See also https://github.com/vector-im/element-web/issues/17561
return (
<div className="mx_EventTile_msgOption">
<span className="mx_EventTile_readAvatars" />
</div>
);
}

const ReadReceiptMarker = sdk.getComponent('rooms.ReadReceiptMarker');
Expand Down

0 comments on commit b43315c

Please sign in to comment.