Update electron to 24.2.0

This commit is contained in:
Fedor Indutny 2023-05-10 12:58:35 -07:00 committed by GitHub
parent 9ad9b4da0f
commit 48545d6a83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 41 additions and 35 deletions

View file

@ -85,9 +85,15 @@ export function SmartStoryCreator(): JSX.Element | null {
);
const addStoryData = useSelector(getAddStoryData);
const file = addStoryData?.type === 'Media' ? addStoryData.file : undefined;
let file: File | undefined;
const isSending = addStoryData?.sending || false;
if (addStoryData?.type === 'Media') {
// Note that the source type is ReadonlyDeep<File>, but browser APIs don't
// support that. Hence the cast.
file = addStoryData.file as File;
}
const recentEmojis = useRecentEmojis();
const skinTone = useSelector<StateType, number>(getEmojiSkinTone);
const { onSetSkinTone } = useItemsActions();

View file

@ -10,7 +10,7 @@ import type { InMemoryAttachmentDraftType } from '../types/Attachment';
import { fileToBytes } from './fileToBytes';
export async function handleVideoAttachment(
file: Readonly<File>
file: File
): Promise<InMemoryAttachmentDraftType> {
const objectUrl = URL.createObjectURL(file);
if (!objectUrl) {