You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-12-05 15:22:09 +03:00
@@ -1115,11 +1115,12 @@ class TimelinePanel extends React.Component<IProps, IState> {
|
||||
public forgetReadMarker = (): void => {
|
||||
if (!this.props.manageReadMarkers) return;
|
||||
|
||||
// Find the read receipt - we will set the read marker to this
|
||||
const rmId = this.getCurrentReadReceipt();
|
||||
|
||||
// see if we know the timestamp for the rr event
|
||||
// Look up the timestamp if we can find it
|
||||
const tl = this.props.timelineSet.getTimelineForEvent(rmId);
|
||||
let rmTs;
|
||||
let rmTs: number;
|
||||
if (tl) {
|
||||
const event = tl.getEvents().find((e) => { return e.getId() == rmId; });
|
||||
if (event) {
|
||||
@@ -1127,7 +1128,11 @@ class TimelinePanel extends React.Component<IProps, IState> {
|
||||
}
|
||||
}
|
||||
|
||||
// Update the read marker to the values we found
|
||||
this.setReadMarker(rmId, rmTs);
|
||||
|
||||
// Send the receipts to the server immediately (don't wait for activity)
|
||||
this.sendReadReceipt();
|
||||
};
|
||||
|
||||
/* return true if the content is fully scrolled down and we are
|
||||
|
||||
Reference in New Issue
Block a user