You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
Use MImageReplyBody for stickers
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
@@ -80,7 +80,9 @@ export default class ReplyTile extends React.PureComponent<IProps> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const msgtype = this.props.mxEvent.getContent().msgtype;
|
const mxEvent = this.props.mxEvent;
|
||||||
|
const msgtype = mxEvent.getContent().msgtype;
|
||||||
|
const evType = mxEvent.getType() as EventType;
|
||||||
|
|
||||||
const { tileHandler, isInfoMessage } = getEventDisplayInfo(this.props.mxEvent);
|
const { tileHandler, isInfoMessage } = getEventDisplayInfo(this.props.mxEvent);
|
||||||
// This shouldn't happen: the caller should check we support this type
|
// This shouldn't happen: the caller should check we support this type
|
||||||
@@ -105,7 +107,12 @@ export default class ReplyTile extends React.PureComponent<IProps> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let sender;
|
let sender;
|
||||||
const needsSenderProfile = msgtype !== MsgType.Image && tileHandler !== EventType.RoomCreate && !isInfoMessage;
|
const needsSenderProfile = (
|
||||||
|
!isInfoMessage &&
|
||||||
|
msgtype !== MsgType.Image &&
|
||||||
|
tileHandler !== EventType.RoomCreate &&
|
||||||
|
evType !== EventType.Sticker
|
||||||
|
);
|
||||||
|
|
||||||
if (needsSenderProfile) {
|
if (needsSenderProfile) {
|
||||||
sender = <SenderProfile
|
sender = <SenderProfile
|
||||||
@@ -121,7 +128,8 @@ export default class ReplyTile extends React.PureComponent<IProps> {
|
|||||||
[MsgType.Video]: MFileBody,
|
[MsgType.Video]: MFileBody,
|
||||||
};
|
};
|
||||||
const evOverrides = {
|
const evOverrides = {
|
||||||
[EventType.Sticker]: TextualBody,
|
// Use MImageReplyBody so that the sticker isn't taking up a lot of space
|
||||||
|
[EventType.Sticker]: MImageReplyBody,
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user