diff --git a/src/app/organisms/room/RoomViewContent.jsx b/src/app/organisms/room/RoomViewContent.jsx index c7ba8f9..7570619 100644 --- a/src/app/organisms/room/RoomViewContent.jsx +++ b/src/app/organisms/room/RoomViewContent.jsx @@ -608,13 +608,15 @@ function RoomViewContent({ eventId, roomTimeline }) { } } - unreadDivider = (readEvent && !unreadDivider - && prevMEvent?.getTs() <= readEvent.getTs() - && readEvent.getTs() < mEvent.getTs()); - if (unreadDivider) { - tl.push(); - itemCountIndex += 1; - if (jumpToItemIndex === -1) jumpToItemIndex = itemCountIndex; + if (!unreadDivider) { + unreadDivider = (readEvent + && prevMEvent?.getTs() <= readEvent.getTs() + && readEvent.getTs() < mEvent.getTs()); + if (unreadDivider) { + tl.push(); + itemCountIndex += 1; + if (jumpToItemIndex === -1) jumpToItemIndex = itemCountIndex; + } } const dayDivider = prevMEvent && !isInSameDay(mEvent.getDate(), prevMEvent.getDate()); if (dayDivider) {