You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Merge pull request #6169 from matrix-org/jryans/rebuild-the-sky
Restore read receipt animation from event to event
This commit is contained in:
@@ -644,7 +644,18 @@ export default class EventTile extends React.Component<IProps, IState> {
|
|||||||
|
|
||||||
// return early if there are no read receipts
|
// return early if there are no read receipts
|
||||||
if (!this.props.readReceipts || this.props.readReceipts.length === 0) {
|
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. Without 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');
|
const ReadReceiptMarker = sdk.getComponent('rooms.ReadReceiptMarker');
|
||||||
@@ -652,11 +663,7 @@ export default class EventTile extends React.Component<IProps, IState> {
|
|||||||
const receiptOffset = 15;
|
const receiptOffset = 15;
|
||||||
let left = 0;
|
let left = 0;
|
||||||
|
|
||||||
const receipts = this.props.readReceipts || [];
|
const receipts = this.props.readReceipts;
|
||||||
|
|
||||||
if (receipts.length === 0) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let i = 0; i < receipts.length; ++i) {
|
for (let i = 0; i < receipts.length; ++i) {
|
||||||
const receipt = receipts[i];
|
const receipt = receipts[i];
|
||||||
|
|||||||
Reference in New Issue
Block a user