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,7 +608,8 @@ function RoomViewContent({ eventId, roomTimeline }) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unreadDivider = (readEvent && !unreadDivider
|
if (!unreadDivider) {
|
||||||
|
unreadDivider = (readEvent
|
||||||
&& prevMEvent?.getTs() <= readEvent.getTs()
|
&& prevMEvent?.getTs() <= readEvent.getTs()
|
||||||
&& readEvent.getTs() < mEvent.getTs());
|
&& readEvent.getTs() < mEvent.getTs());
|
||||||
if (unreadDivider) {
|
if (unreadDivider) {
|
||||||
|
@ -616,6 +617,7 @@ function RoomViewContent({ eventId, roomTimeline }) {
|
||||||
itemCountIndex += 1;
|
itemCountIndex += 1;
|
||||||
if (jumpToItemIndex === -1) jumpToItemIndex = itemCountIndex;
|
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) {
|
||||||
tl.push(<Divider key={`divider-${mEvent.getId()}`} text={`${dateFormat(mEvent.getDate(), 'mmmm dd, yyyy')}`} />);
|
tl.push(<Divider key={`divider-${mEvent.getId()}`} text={`${dateFormat(mEvent.getDate(), 'mmmm dd, yyyy')}`} />);
|
||||||
|
|
Loading…
Reference in a new issue