File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
ts/components/conversation/media-gallery Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ export function MediaGridItem(props: Props): JSX.Element {
5151 ) ;
5252
5353 let label : string ;
54- if ( attachment . url || attachment . incrementalUrl ) {
54+ if ( url != null ) {
5555 label = i18n ( 'icu:imageOpenAlt' ) ;
5656 } else if ( attachment . pending ) {
5757 label = i18n ( 'icu:cancelDownload' ) ;
@@ -84,7 +84,8 @@ type SpinnerOverlayProps = Readonly<{
8484function SpinnerOverlay ( props : SpinnerOverlayProps ) : JSX . Element | undefined {
8585 const { attachment } = props ;
8686
87- if ( attachment . url != null || attachment . incrementalUrl != null ) {
87+ const url = getUrl ( attachment ) ;
88+ if ( url != null ) {
8889 return undefined ;
8990 }
9091
@@ -131,8 +132,8 @@ type MetadataOverlayProps = Readonly<{
131132function MetadataOverlay ( props : MetadataOverlayProps ) : JSX . Element | undefined {
132133 const { i18n, attachment } = props ;
133134
134- const canBeShown =
135- attachment . url != null || attachment . incrementalUrl != null ;
135+ const url = getUrl ( attachment ) ;
136+ const canBeShown = url != null ;
136137 if ( canBeShown && ! isGIF ( [ attachment ] ) ) {
137138 return undefined ;
138139 }
You can’t perform that action at this time.
0 commit comments