From b341528f108cbef45b6b622e134b7a31014dec7e Mon Sep 17 00:00:00 2001 From: Reinaldo Neto Date: Wed, 7 Jun 2023 17:23:01 -0300 Subject: [PATCH] refactor audio --- app/containers/message/Attachments.tsx | 1 - app/containers/message/Audio.tsx | 15 ++++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/app/containers/message/Attachments.tsx b/app/containers/message/Attachments.tsx index 2000a6eb1..d08566e9c 100644 --- a/app/containers/message/Attachments.tsx +++ b/app/containers/message/Attachments.tsx @@ -85,7 +85,6 @@ const Attachments: React.FC = React.memo( isReply={isReply} style={style} theme={theme} - messageId={id} author={author} /> ); diff --git a/app/containers/message/Audio.tsx b/app/containers/message/Audio.tsx index 9e68355f6..4bf5bec8b 100644 --- a/app/containers/message/Audio.tsx +++ b/app/containers/message/Audio.tsx @@ -19,7 +19,7 @@ import { withDimensions } from '../../dimensions'; import { TGetCustomEmoji } from '../../definitions/IEmoji'; import { IAttachment, IUserMessage } from '../../definitions'; import { TSupportedThemes, useTheme } from '../../theme'; -import { MediaTypes, downloadMediaFile, searchMediaFileAsync } from '../../lib/methods/handleMediaDownload'; +import { downloadMediaFile, searchMediaFileAsync } from '../../lib/methods/handleMediaDownload'; import EventEmitter from '../../lib/methods/helpers/events'; import { PAUSE_AUDIO } from './constants'; import { fetchAutoDownloadEnabled } from '../../lib/methods/autoDownloadPreference'; @@ -39,7 +39,6 @@ interface IMessageAudioProps { theme: TSupportedThemes; getCustomEmoji: TGetCustomEmoji; scale?: number; - messageId: string; author?: IUserMessage; } @@ -144,11 +143,11 @@ class MessageAudio extends React.Component { @@ -286,7 +285,6 @@ class MessageAudio extends React.Component { - const { messageId } = this.props; // @ts-ignore can't use declare to type this const { user } = this.context; this.setState({ loading: true }); @@ -295,8 +293,7 @@ class MessageAudio extends React.Component