diff --git a/ts/components/session/conversation/SessionCompositionBox.tsx b/ts/components/session/conversation/SessionCompositionBox.tsx index a5f87ddeb..600ba47b1 100644 --- a/ts/components/session/conversation/SessionCompositionBox.tsx +++ b/ts/components/session/conversation/SessionCompositionBox.tsx @@ -530,6 +530,7 @@ export class SessionCompositionBox extends React.Component { const objectUrl = URL.createObjectURL(file); try { const type = 'image/png'; + const thumbnail = await VisualAttachment.makeVideoScreenshot({ objectUrl, contentType: type, @@ -664,9 +665,12 @@ export class SessionCompositionBox extends React.Component { if (attachment.isVoiceMessage && stagedAttachments.length > 0) { throw new Error('A voice note cannot be sent with other attachments'); } - this.setState({ - stagedAttachments: [...stagedAttachments, { ...attachment }], - }); + this.setState( + { + stagedAttachments: [...stagedAttachments, { ...attachment }], + }, + this.focusCompositionBox + ); } private async autoScale( diff --git a/ts/session/utils/Toast.ts b/ts/session/utils/Toast.ts index 664fc3cb1..b60f89e1f 100644 --- a/ts/session/utils/Toast.ts +++ b/ts/session/utils/Toast.ts @@ -17,7 +17,6 @@ export function pushLoadAttachmentFailure() { }); } - export function pushDangerousFileError() { window.pushToast({ title: window.i18n('dangerousFileType'),