Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
diegolmello committed Feb 29, 2024
1 parent 36c66b5 commit b734b18
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,21 @@ export const RecordAudio = (): ReactElement | null => {
try {
if (!rid) return;
setRecordingAudio(false);
const fileURI = recordingRef.current?.getURI();
const fileData = await getInfoAsync(fileURI as string);
const fileInfo = {
const fileURI = recordingRef.current?.getURI() as string;
const fileData = await getInfoAsync(fileURI);

if (!fileData.exists) {
return;
}

const fileInfo: IUpload = {
rid,
name: `${Date.now()}${RECORDING_EXTENSION}`,
mime: 'audio/aac',
type: 'audio/aac',
store: 'Uploads',
path: fileURI,
size: fileData.exists ? fileData.size : null
} as IUpload;
size: fileData.size
};

if (fileInfo) {
if (permissionToUpload) {
Expand Down
4 changes: 2 additions & 2 deletions app/containers/message/Attachments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ const AttachedActions = ({ attachment, getCustomEmoji }: { attachment: IAttachme
};

const Attachments: React.FC<IMessageAttachments> = React.memo(
({ attachments, timeFormat, showAttachment, style, getCustomEmoji, isReply, author, isEncrypted }: IMessageAttachments) => {
const { translateLanguage } = useContext(MessageContext);
({ attachments, timeFormat, showAttachment, style, getCustomEmoji, isReply, author }: IMessageAttachments) => {
const { translateLanguage, isEncrypted } = useContext(MessageContext);

if (!attachments || attachments.length === 0) {
return null;
Expand Down
3 changes: 2 additions & 1 deletion app/containers/message/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,8 @@ class MessageContainer extends React.Component<IMessageContainerProps, IMessageC
threadBadgeColor,
toggleFollowThread,
replies,
translateLanguage: canTranslateMessage ? autoTranslateLanguage : undefined
translateLanguage: canTranslateMessage ? autoTranslateLanguage : undefined,
isEncrypted: this.isEncrypted
}}
>
{/* @ts-ignore*/}
Expand Down
1 change: 0 additions & 1 deletion app/containers/message/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export interface IMessageAttachments {
timeFormat?: string;
style?: StyleProp<TextStyle>[];
isReply?: boolean;
isEncrypted: boolean;
showAttachment?: (file: IAttachment) => void;
getCustomEmoji: TGetCustomEmoji;
author?: IUserMessage;
Expand Down

0 comments on commit b734b18

Please sign in to comment.