rename Attachment type in Quote.tsx to QuotedAttachmentThumbnailType to be more explicit

pull/2757/head
William Grant 2 years ago
parent 025b844cce
commit bc55a2db1b

@ -54,7 +54,7 @@ export type QuoteProps = {
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void; onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
}; };
export interface Attachment { export interface QuotedAttachmentThumbnailType {
contentType: MIME.MIMEType; contentType: MIME.MIMEType;
/** Not included in protobuf, and is loaded asynchronously */ /** Not included in protobuf, and is loaded asynchronously */
objectUrl?: string; objectUrl?: string;
@ -65,7 +65,7 @@ export interface QuotedAttachmentType {
fileName: string; fileName: string;
/** Not included in protobuf */ /** Not included in protobuf */
isVoiceMessage: boolean; isVoiceMessage: boolean;
thumbnail?: Attachment; thumbnail?: QuotedAttachmentThumbnailType;
} }
export const Quote = (props: QuoteProps) => { export const Quote = (props: QuoteProps) => {

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { Attachment, QuoteProps } from './Quote'; import { QuotedAttachmentThumbnailType, QuoteProps } from './Quote';
import { GoogleChrome } from '../../../../../util'; import { GoogleChrome } from '../../../../../util';
import { MIME } from '../../../../../types'; import { MIME } from '../../../../../types';
@ -8,7 +8,7 @@ import { QuoteImage } from './QuoteImage';
import styled from 'styled-components'; import styled from 'styled-components';
import { icons, SessionIconType } from '../../../../icon'; import { icons, SessionIconType } from '../../../../icon';
function getObjectUrl(thumbnail: Attachment | undefined): string | undefined { function getObjectUrl(thumbnail: QuotedAttachmentThumbnailType | undefined): string | undefined {
if (thumbnail && thumbnail.objectUrl) { if (thumbnail && thumbnail.objectUrl) {
return thumbnail.objectUrl; return thumbnail.objectUrl;
} }

Loading…
Cancel
Save