Update to thread UI (#7714)

This commit is contained in:
Germain 2022-02-03 16:24:49 +00:00 committed by GitHub
parent 78e78292cb
commit df86678798
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 5 deletions

View file

@ -24,11 +24,13 @@ import { getUserNameColorClass } from '../../../utils/FormattingUtils';
import MatrixClientContext from "../../../contexts/MatrixClientContext";
import { replaceableComponent } from "../../../utils/replaceableComponent";
import UserIdentifier from '../../../customisations/UserIdentifier';
import { TileShape } from '../rooms/EventTile';
interface IProps {
mxEvent: MatrixEvent;
onClick?(): void;
enableFlair: boolean;
tileShape?: TileShape;
}
interface IState {
@ -109,7 +111,7 @@ export default class SenderProfile extends React.Component<IProps, IState> {
const displayName = mxEvent.sender?.rawDisplayName || mxEvent.getSender() || "";
const mxid = mxEvent.sender?.userId || mxEvent.getSender() || "";
if (msgtype === MsgType.Emote) {
if (msgtype === MsgType.Emote && this.props.tileShape !== TileShape.ThreadPanel) {
return null; // emote message must include the name so don't duplicate it
}