Pass permallinkCreator to ImageView
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>pull/21833/head
parent
fa9ae89b5b
commit
bd5efc7ceb
|
@ -42,6 +42,7 @@ export default class ImageView extends React.Component {
|
|||
// properties above, which let us use lightboxes to display images which aren't associated
|
||||
// with events.
|
||||
mxEvent: PropTypes.object,
|
||||
permalinkCreator: PropTypes.object,
|
||||
};
|
||||
|
||||
constructor(props) {
|
||||
|
|
|
@ -38,6 +38,8 @@ export default class MImageBody extends React.Component {
|
|||
|
||||
/* the maximum image height to use */
|
||||
maxImageHeight: PropTypes.number,
|
||||
|
||||
permalinkCreator: PropTypes.object,
|
||||
};
|
||||
|
||||
static contextType = MatrixClientContext;
|
||||
|
@ -103,6 +105,7 @@ export default class MImageBody extends React.Component {
|
|||
src: httpUrl,
|
||||
name: content.body && content.body.length > 0 ? content.body : _t('Attachment'),
|
||||
mxEvent: this.props.mxEvent,
|
||||
permalinkCreator: this.props.permalinkCreator,
|
||||
};
|
||||
|
||||
if (content.info) {
|
||||
|
|
|
@ -44,6 +44,8 @@ export default class MessageEvent extends React.Component {
|
|||
|
||||
/* the maximum image height to use, if the event is an image */
|
||||
maxImageHeight: PropTypes.number,
|
||||
|
||||
permalinkCreator: PropTypes.object,
|
||||
};
|
||||
|
||||
constructor(props) {
|
||||
|
@ -120,6 +122,7 @@ export default class MessageEvent extends React.Component {
|
|||
editState={this.props.editState}
|
||||
onHeightChanged={this.props.onHeightChanged}
|
||||
onMessageAllowed={this.onTileUpdate}
|
||||
permalinkCreator={this.props.permalinkCreator}
|
||||
/>;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -968,6 +968,7 @@ export default class EventTile extends React.Component {
|
|||
highlights={this.props.highlights}
|
||||
highlightLink={this.props.highlightLink}
|
||||
showUrlPreview={this.props.showUrlPreview}
|
||||
permalinkCreator={this.props.permalinkCreator}
|
||||
onHeightChanged={this.props.onHeightChanged} />
|
||||
{ keyRequestInfo }
|
||||
{ reactionsRow }
|
||||
|
|
Loading…
Reference in New Issue