mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08:00
Remove unnecessary this.props
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
ccf3af21f9
commit
cedf2db9ec
@ -96,7 +96,7 @@ export default class ReplyTile extends React.PureComponent<IProps> {
|
|||||||
const msgType = mxEvent.getContent().msgtype;
|
const msgType = mxEvent.getContent().msgtype;
|
||||||
const evType = mxEvent.getType() as EventType;
|
const evType = mxEvent.getType() as EventType;
|
||||||
|
|
||||||
const { tileHandler, isInfoMessage } = getEventDisplayInfo(this.props.mxEvent);
|
const { tileHandler, isInfoMessage } = getEventDisplayInfo(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
|
||||||
// before trying to instantiate us
|
// before trying to instantiate us
|
||||||
if (!tileHandler) {
|
if (!tileHandler) {
|
||||||
@ -110,14 +110,14 @@ export default class ReplyTile extends React.PureComponent<IProps> {
|
|||||||
const EventTileType = sdk.getComponent(tileHandler);
|
const EventTileType = sdk.getComponent(tileHandler);
|
||||||
|
|
||||||
const classes = classNames("mx_ReplyTile", {
|
const classes = classNames("mx_ReplyTile", {
|
||||||
mx_ReplyTile_info: isInfoMessage && !this.props.mxEvent.isRedacted(),
|
mx_ReplyTile_info: isInfoMessage && !mxEvent.isRedacted(),
|
||||||
mx_ReplyTile_audio: msgType === MsgType.Audio,
|
mx_ReplyTile_audio: msgType === MsgType.Audio,
|
||||||
mx_ReplyTile_video: msgType === MsgType.Video,
|
mx_ReplyTile_video: msgType === MsgType.Video,
|
||||||
});
|
});
|
||||||
|
|
||||||
let permalink = "#";
|
let permalink = "#";
|
||||||
if (this.props.permalinkCreator) {
|
if (this.props.permalinkCreator) {
|
||||||
permalink = this.props.permalinkCreator.forEvent(this.props.mxEvent.getId());
|
permalink = this.props.permalinkCreator.forEvent(mxEvent.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
let sender;
|
let sender;
|
||||||
@ -130,7 +130,7 @@ export default class ReplyTile extends React.PureComponent<IProps> {
|
|||||||
|
|
||||||
if (needsSenderProfile) {
|
if (needsSenderProfile) {
|
||||||
sender = <SenderProfile
|
sender = <SenderProfile
|
||||||
mxEvent={this.props.mxEvent}
|
mxEvent={mxEvent}
|
||||||
enableFlair={false}
|
enableFlair={false}
|
||||||
/>;
|
/>;
|
||||||
}
|
}
|
||||||
@ -152,14 +152,14 @@ export default class ReplyTile extends React.PureComponent<IProps> {
|
|||||||
{ sender }
|
{ sender }
|
||||||
<EventTileType
|
<EventTileType
|
||||||
ref="tile"
|
ref="tile"
|
||||||
mxEvent={this.props.mxEvent}
|
mxEvent={mxEvent}
|
||||||
highlights={this.props.highlights}
|
highlights={this.props.highlights}
|
||||||
highlightLink={this.props.highlightLink}
|
highlightLink={this.props.highlightLink}
|
||||||
onHeightChanged={this.props.onHeightChanged}
|
onHeightChanged={this.props.onHeightChanged}
|
||||||
showUrlPreview={false}
|
showUrlPreview={false}
|
||||||
overrideBodyTypes={msgtypeOverrides}
|
overrideBodyTypes={msgtypeOverrides}
|
||||||
overrideEventTypes={evOverrides}
|
overrideEventTypes={evOverrides}
|
||||||
replacingEventId={this.props.mxEvent.replacingEventId()}
|
replacingEventId={mxEvent.replacingEventId()}
|
||||||
maxImageHeight={96} />
|
maxImageHeight={96} />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user