Allow manually retrying attachment downloads
This commit is contained in:
parent
59b45399e4
commit
dfc310805a
16 changed files with 265 additions and 58 deletions
|
@ -73,6 +73,10 @@ export type AttachmentType = {
|
|||
|
||||
/** Legacy field. Used only for downloading old attachments */
|
||||
id?: number;
|
||||
|
||||
/** Removed once we download the attachment */
|
||||
digest?: string;
|
||||
key?: string;
|
||||
};
|
||||
|
||||
export enum TextAttachmentStyleType {
|
||||
|
@ -1018,3 +1022,9 @@ export const defaultBlurHash = (theme: ThemeType = ThemeType.light): string => {
|
|||
}
|
||||
return 'L1Q]+w-;fQ-;~qfQfQfQfQfQfQfQ';
|
||||
};
|
||||
|
||||
export const canBeDownloaded = (
|
||||
attachment: Pick<AttachmentType, 'key' | 'digest'>
|
||||
): boolean => {
|
||||
return Boolean(attachment.key && attachment.digest);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue