diff --git a/ts/components/conversation/Timeline.tsx b/ts/components/conversation/Timeline.tsx index fc6dc61da..9c0073315 100644 --- a/ts/components/conversation/Timeline.tsx +++ b/ts/components/conversation/Timeline.tsx @@ -541,17 +541,13 @@ export class Timeline extends React.Component< this.intersectionObserver.observe(atBottomDetectorEl); } - private markNewestBottomVisibleMessageRead = throttle( - (): void => { - const { markMessageRead } = this.props; - const { newestBottomVisibleMessageId } = this.state; - if (newestBottomVisibleMessageId) { - markMessageRead(newestBottomVisibleMessageId); - } - }, - 500, - { leading: false } - ); + private markNewestBottomVisibleMessageRead = throttle((): void => { + const { markMessageRead } = this.props; + const { newestBottomVisibleMessageId } = this.state; + if (newestBottomVisibleMessageId) { + markMessageRead(newestBottomVisibleMessageId); + } + }, 500); public override componentDidMount(): void { const containerEl = this.containerRef.current; @@ -674,6 +670,8 @@ export class Timeline extends React.Component< numberToKeepAtBottom: this.maxVisibleRows, }); } + } else { + this.markNewestBottomVisibleMessageRead(); } }