Fix multiple new message indicator
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
ba64ba0bd0
commit
ca15e69ae0
1 changed files with 9 additions and 7 deletions
|
@ -608,13 +608,15 @@ function RoomViewContent({ eventId, roomTimeline }) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unreadDivider = (readEvent && !unreadDivider
|
if (!unreadDivider) {
|
||||||
&& prevMEvent?.getTs() <= readEvent.getTs()
|
unreadDivider = (readEvent
|
||||||
&& readEvent.getTs() < mEvent.getTs());
|
&& prevMEvent?.getTs() <= readEvent.getTs()
|
||||||
if (unreadDivider) {
|
&& readEvent.getTs() < mEvent.getTs());
|
||||||
tl.push(<Divider key={`new-${mEvent.getId()}`} variant="positive" text="New messages" />);
|
if (unreadDivider) {
|
||||||
itemCountIndex += 1;
|
tl.push(<Divider key={`new-${mEvent.getId()}`} variant="positive" text="New messages" />);
|
||||||
if (jumpToItemIndex === -1) jumpToItemIndex = itemCountIndex;
|
itemCountIndex += 1;
|
||||||
|
if (jumpToItemIndex === -1) jumpToItemIndex = itemCountIndex;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const dayDivider = prevMEvent && !isInSameDay(mEvent.getDate(), prevMEvent.getDate());
|
const dayDivider = prevMEvent && !isInSameDay(mEvent.getDate(), prevMEvent.getDate());
|
||||||
if (dayDivider) {
|
if (dayDivider) {
|
||||||
|
|
Loading…
Reference in a new issue