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

Commit b54c7d8

Browse files
Fix not being able to open avatars in lightbox (#8598)
1 parent eb10c36 commit b54c7d8

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/components/views/elements/ImageView.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,15 @@ export default class ImageView extends React.Component<IProps, IState> {
535535
);
536536
}
537537

538+
let title: JSX.Element;
539+
if (this.props.mxEvent?.getContent()) {
540+
title = (
541+
<div className="mx_ImageView_title">
542+
{ presentableTextForFile(this.props.mxEvent?.getContent(), _t("Image"), true) }
543+
</div>
544+
);
545+
}
546+
538547
return (
539548
<FocusLock
540549
returnFocus={true}
@@ -547,9 +556,7 @@ export default class ImageView extends React.Component<IProps, IState> {
547556
>
548557
<div className="mx_ImageView_panel">
549558
{ info }
550-
<div className="mx_ImageView_title">
551-
{ presentableTextForFile(this.props.mxEvent.getContent(), _t("Image"), true) }
552-
</div>
559+
{ title }
553560
<div className="mx_ImageView_toolbar">
554561
{ zoomOutButton }
555562
{ zoomInButton }

0 commit comments

Comments
 (0)