From c375b6058f67da627708e878dad35ea5c2ac098b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Mon, 16 Aug 2021 11:04:41 +0200 Subject: [PATCH] Fix call tile spacing issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/components/views/rooms/EventTile.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/views/rooms/EventTile.tsx b/src/components/views/rooms/EventTile.tsx index 301e33ec42..c97b28b368 100644 --- a/src/components/views/rooms/EventTile.tsx +++ b/src/components/views/rooms/EventTile.tsx @@ -856,13 +856,14 @@ export default class EventTile extends React.Component { render() { const msgtype = this.props.mxEvent.getContent().msgtype; + const eventType = this.props.mxEvent.getType() as EventType; const { tileHandler, isBubbleMessage, isInfoMessage } = getEventDisplayInfo(this.props.mxEvent); // This shouldn't happen: the caller should check we support this type // before trying to instantiate us if (!tileHandler) { const { mxEvent } = this.props; - console.warn(`Event type not supported: type:${mxEvent.getType()} isState:${mxEvent.isState()}`); + console.warn(`Event type not supported: type:${eventType} isState:${mxEvent.isState()}`); return
{ _t('This event could not be displayed') } @@ -886,7 +887,10 @@ export default class EventTile extends React.Component { mx_EventTile_sending: !isEditing && isSending, mx_EventTile_highlight: this.props.tileShape === TileShape.Notif ? false : this.shouldHighlight(), mx_EventTile_selected: this.props.isSelectedEvent, - mx_EventTile_continuation: this.props.tileShape ? '' : this.props.continuation, + mx_EventTile_continuation: ( + (this.props.tileShape ? '' : this.props.continuation) || + eventType === EventType.CallInvite + ), mx_EventTile_last: this.props.last, mx_EventTile_lastInSection: this.props.lastInSection, mx_EventTile_contextual: this.props.contextual, @@ -934,7 +938,7 @@ export default class EventTile extends React.Component { needsSenderProfile = true; } else if ( (this.props.continuation && this.props.tileShape !== TileShape.FileGrid) || - this.props.mxEvent.getType() === EventType.CallInvite + eventType === EventType.CallInvite ) { // no avatar or sender profile for continuation messages and call tiles avatarSize = 0;