Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Fix not being able to open avatars in lightbox (#8598)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonBrandner authored May 14, 2022
1 parent eb10c36 commit b54c7d8
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/components/views/elements/ImageView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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 }
Expand Down

0 comments on commit b54c7d8

Please sign in to comment.