parent
d9396b0b54
commit
4e1958d9fe
2 changed files with 105 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue