From 314475985c2631d85d79a5597e0a5350cdeedfef Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 16 Dec 2021 18:35:28 +0000 Subject: [PATCH] Fix bubble radius wrong when followed by a state event from same user (#7393) --- src/components/structures/MessagePanel.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/structures/MessagePanel.tsx b/src/components/structures/MessagePanel.tsx index 7db09c6720..5cbbdf747e 100644 --- a/src/components/structures/MessagePanel.tsx +++ b/src/components/structures/MessagePanel.tsx @@ -50,6 +50,7 @@ import TileErrorBoundary from '../views/messages/TileErrorBoundary'; import { RoomPermalinkCreator } from "../../utils/permalinks/Permalinks"; import EditorStateTransfer from "../../utils/EditorStateTransfer"; import { Action } from '../../dispatcher/actions'; +import { getEventDisplayInfo } from "../../utils/EventUtils"; const CONTINUATION_MAX_INTERVAL = 5 * 60 * 1000; // 5 minutes const continuedTypes = [EventType.Sticker, EventType.RoomMessage]; @@ -724,7 +725,8 @@ export default class MessagePanel extends React.Component { let lastInSection = true; if (nextEventWithTile) { willWantDateSeparator = this.wantsDateSeparator(mxEv, nextEventWithTile.getDate() || new Date()); - lastInSection = willWantDateSeparator || mxEv.getSender() !== nextEventWithTile.getSender(); + lastInSection = willWantDateSeparator || mxEv.getSender() !== nextEventWithTile.getSender() || + getEventDisplayInfo(nextEventWithTile).isInfoMessage; } // is this a continuation of the previous message?