Use MImageReplyBody for stickers
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
782563af53
commit
6c801fea53
1 changed files with 11 additions and 3 deletions
|
@ -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 (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue