Iterate on search results for message bubbles (#7047)
* PSFD-455: Iterate on search results for message bubbles Though not perfect, this is a bit better than it was before. Specifically, we ensure our matching for `isOwnEvent` correctly identifies the user and that the results don't look *awful*. There's still room for improvement, but this should be a measurable improvement itself. Most notably, this doesn't fix a couple obvious bugs due to complexity: * Message bubbles have the wrong corners for the display format (pre-existing). * The sender's own messages are missing avatars/names. This is just way too complex to fix. **Requires https://github.com/matrix-org/matrix-js-sdk/pull/2004** * Tweak opacity Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
6d6cfcde11
commit
bc0bfa6377
2 changed files with 23 additions and 1 deletions
|
@ -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: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue