Fix not being able to open avatars in lightbox (#8598)

This commit is contained in:
Šimon Brandner 2022-05-14 18:07:54 +02:00 committed by GitHub
parent eb10c3647b
commit b54c7d8faf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -535,6 +535,15 @@ export default class ImageView extends React.Component<IProps, IState> {
);
}
let title: JSX.Element;
if (this.props.mxEvent?.getContent()) {
title = (
<div className="mx_ImageView_title">
{ presentableTextForFile(this.props.mxEvent?.getContent(), _t("Image"), true) }
</div>
);
}
return (
<FocusLock
returnFocus={true}
@ -547,9 +556,7 @@ export default class ImageView extends React.Component<IProps, IState> {
>
<div className="mx_ImageView_panel">
{ info }
<div className="mx_ImageView_title">
{ presentableTextForFile(this.props.mxEvent.getContent(), _t("Image"), true) }
</div>
{ title }
<div className="mx_ImageView_toolbar">
{ zoomOutButton }
{ zoomInButton }