Signed-off-by: Ajay Bura <ajbura@gmail.com>
readEventStore.setItem(roomTimeline.findEventByIdInTimelineSet(readUpToId));
return;
}
+
+ // user has not mark room as read
const isUnreadMsg = readUpToEvent?.getId() === readUpToId;
if (!isUnreadMsg) {
roomTimeline.markAllAsRead();
&& !roomTimeline.canPaginateForward()
&& document.visibilityState === 'visible') {
timelineScroll.scrollToBottom();
+ } else {
+ timelineScroll.tryRestoringScroll();
}
}, [newEvent, roomTimeline]);
}