Moves DraftAttachments into redux
This commit is contained in:
parent
f81f61af4e
commit
1c3c971cf4
20 changed files with 818 additions and 444 deletions
|
@ -55,6 +55,7 @@ export type AttachmentType = {
|
|||
contentType: MIME.MIMEType;
|
||||
path: string;
|
||||
};
|
||||
screenshotData?: Uint8Array;
|
||||
screenshotPath?: string;
|
||||
flags?: number;
|
||||
thumbnail?: ThumbnailType;
|
||||
|
@ -96,19 +97,6 @@ export type InMemoryAttachmentDraftType =
|
|||
pending: true;
|
||||
};
|
||||
|
||||
export type OnDiskAttachmentDraftType =
|
||||
| ({
|
||||
caption?: string;
|
||||
pending: false;
|
||||
screenshotPath?: string;
|
||||
} & BaseAttachmentDraftType)
|
||||
| {
|
||||
contentType: MIME.MIMEType;
|
||||
fileName: string;
|
||||
path: string;
|
||||
pending: true;
|
||||
};
|
||||
|
||||
export type AttachmentDraftType =
|
||||
| ({
|
||||
url: string;
|
||||
|
|
11
ts/types/AttachmentToastType.ts
Normal file
11
ts/types/AttachmentToastType.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
export enum AttachmentToastType {
|
||||
ToastCannotMixImageAndNonImageAttachments,
|
||||
ToastDangerousFileType,
|
||||
ToastFileSize,
|
||||
ToastMaxAttachments,
|
||||
ToastOneNonImageAtATime,
|
||||
ToastUnableToLoadAttachment,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue