diff --git a/ts/components/conversation/message/message-content/Quote.tsx b/ts/components/conversation/message/message-content/Quote.tsx index 0075ce10e..017480f20 100644 --- a/ts/components/conversation/message/message-content/Quote.tsx +++ b/ts/components/conversation/message/message-content/Quote.tsx @@ -218,7 +218,8 @@ export const QuoteIconContainer = ( if (MIME.isAudio(contentType)) { return ; } - return null; + + return ; }; export const QuoteText = ( diff --git a/ts/components/conversation/message/message-content/quote/QuoteIconContainer.tsx b/ts/components/conversation/message/message-content/quote/QuoteIconContainer.tsx index 0f1855b03..ff53da182 100644 --- a/ts/components/conversation/message/message-content/quote/QuoteIconContainer.tsx +++ b/ts/components/conversation/message/message-content/quote/QuoteIconContainer.tsx @@ -94,44 +94,38 @@ export const QuoteIconContainer = ( } const { contentType, thumbnail } = attachment; - const isGenericFile = - !GoogleChrome.isVideoTypeSupported(contentType) && - !GoogleChrome.isImageTypeSupported(contentType) && - !MIME.isAudio(contentType); + const objectUrl = getObjectUrl(thumbnail); - if (isGenericFile) { - return ; + if (GoogleChrome.isVideoTypeSupported(contentType)) { + return objectUrl && !imageBroken ? ( + + ) : ( + + ); } - const objectUrl = getObjectUrl(thumbnail); - if (objectUrl) { - if (GoogleChrome.isVideoTypeSupported(contentType)) { - return ( - - ); - } - - if (GoogleChrome.isImageTypeSupported(contentType)) { - return ( - - ); - } + if (GoogleChrome.isImageTypeSupported(contentType)) { + return objectUrl && !imageBroken ? ( + + ) : ( + + ); } if (MIME.isAudio(contentType)) { return ; } - return null; + return ; };