From def1c68c16d02108b3deff2ebee9abb07fc91ed9 Mon Sep 17 00:00:00 2001 From: Robin Townsend Date: Thu, 9 Sep 2021 16:11:36 -0400 Subject: [PATCH] Fix message bubble corners being wrong in the presence of hidden events Signed-off-by: Robin Townsend --- src/components/structures/MessagePanel.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/structures/MessagePanel.tsx b/src/components/structures/MessagePanel.tsx index 7da0b754076..589947af73b 100644 --- a/src/components/structures/MessagePanel.tsx +++ b/src/components/structures/MessagePanel.tsx @@ -705,9 +705,9 @@ export default class MessagePanel extends React.Component { let willWantDateSeparator = false; let lastInSection = true; - if (nextEvent) { - willWantDateSeparator = this.wantsDateSeparator(mxEv, nextEvent.getDate() || new Date()); - lastInSection = willWantDateSeparator || mxEv.getSender() !== nextEvent.getSender(); + if (nextEventWithTile) { + willWantDateSeparator = this.wantsDateSeparator(mxEv, nextEventWithTile.getDate() || new Date()); + lastInSection = willWantDateSeparator || mxEv.getSender() !== nextEventWithTile.getSender(); } // is this a continuation of the previous message?