Signed-off-by: Ajay Bura <ajbura@gmail.com>
timelineScroll.scrollToIndex(jumpToItemIndex, 80);
}
if (timelineScroll.bottom < 16 && !roomTimeline.canPaginateForward()) {
- if (readEventStore.getItem()?.getId() === roomTimeline.getReadUpToEventId()) {
+ const readUpToId = roomTimeline.getReadUpToEventId();
+ if (readEventStore.getItem()?.getId() === readUpToId || readUpToId === null) {
requestAnimationFrame(() => roomTimeline.markAllAsRead());
}
}
// we only show "Jump to unread" btn only if the event is not in timeline.
// if event is in timeline
// we will automatically open the timeline from that event position
- if (!readEventId.startsWith('~') && !roomTimeline.hasEventInTimeline(readEventId)) {
+ if (!readEventId?.startsWith('~') && !roomTimeline.hasEventInTimeline(readEventId)) {
setEventId(readEventId);
}