Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Iterate on search results for message bubbles #7047

Merged
merged 3 commits into from
May 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions res/css/views/rooms/_EventBubbleTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion src/components/views/rooms/EventTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1235,7 +1235,8 @@ export class UnwrappedEventTile extends React.Component<IProps, IState> {
/>;
}

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: {
Expand Down