Add download button and pending spinner for audio messages

This commit is contained in:
Fedor Indutny 2021-03-15 17:59:48 -07:00 committed by Josh Perez
parent f98c3cba8c
commit 05f59f3db1
9 changed files with 246 additions and 102 deletions

View file

@ -9,6 +9,7 @@ import { mapDispatchToProps } from '../actions';
import { StateType } from '../reducer';
import { WaveformCache } from '../../types/Audio';
import { LocalizerType } from '../../types/Util';
import { AttachmentType } from '../../types/Attachment';
export type Props = {
audio: HTMLAudioElement;
@ -18,11 +19,12 @@ export type Props = {
direction?: 'incoming' | 'outgoing';
id: string;
i18n: LocalizerType;
url: string;
attachment: AttachmentType;
withContentAbove: boolean;
withContentBelow: boolean;
buttonRef: React.RefObject<HTMLButtonElement>;
kickOffAttachmentDownload(): void;
};
const mapStateToProps = (state: StateType, props: Props) => {