diff --git a/res/css/views/rooms/_EventBubbleTile.scss b/res/css/views/rooms/_EventBubbleTile.scss index a4814c3faf..36488c7448 100644 --- a/res/css/views/rooms/_EventBubbleTile.scss +++ b/res/css/views/rooms/_EventBubbleTile.scss @@ -31,6 +31,27 @@ limitations under the License. margin-right: 60px; } +.mx_RoomView_searchResultsPanel { + .mx_EventTile[data-layout=bubble] { + .mx_SenderProfile { + // Group layout adds a 64px left margin, which we really don't want on search results + margin-left: 0; + } + + &[data-self=true] { + // The avatars end up overlapping, so just hide them + .mx_EventTile_avatar { + display: none; + } + } + + // Mirror rough designs for "greyed out" text + &.mx_EventTile_contextual .mx_EventTile_line { + opacity: 0.4; + } + } +} + .mx_EventTile[data-layout=bubble] { position: relative; margin-top: var(--gutterSize); diff --git a/src/components/views/rooms/EventTile.tsx b/src/components/views/rooms/EventTile.tsx index f5eb751e0b..9ccf7d44dd 100644 --- a/src/components/views/rooms/EventTile.tsx +++ b/src/components/views/rooms/EventTile.tsx @@ -1235,7 +1235,8 @@ export class UnwrappedEventTile extends React.Component { />; } - const isOwnEvent = this.props.mxEvent?.sender?.userId === MatrixClientPeg.get().getUserId(); + // Use `getSender()` because searched events might not have a proper `sender`. + const isOwnEvent = this.props.mxEvent?.getSender() === MatrixClientPeg.get().getUserId(); switch (this.context.timelineRenderingType) { case TimelineRenderingType.Notification: {