diff --git a/src/website/public/components/MessagesList.tsx b/src/website/public/components/MessagesList.tsx index 8cd26a86d1..b94b1e49c4 100644 --- a/src/website/public/components/MessagesList.tsx +++ b/src/website/public/components/MessagesList.tsx @@ -38,6 +38,10 @@ function MessagesList() { continue; } else if (message.kind === "unconfirmed") { const now = new Date(); + const dayString = now.toDateString(); + if (lastSeenDayString === null || lastSeenDayString !== dayString) { + children.push(); + } const mergeWithPrevious: boolean = lastSeenDate !== null && @@ -49,12 +53,14 @@ function MessagesList() { mergeWithPrevious }; children.push(); - prevMessageSender = myUserId; + lastSeenDate = now; + lastSeenDayString = dayString; + prevMessageSender = myUserId; } else { const dayString = message.date.toDateString(); if (lastSeenDayString === null || lastSeenDayString !== dayString) { - children.push(); + children.push(); } const mergeWithPrevious: boolean =