Adds logic around downloading stories
This commit is contained in:
parent
9d3f0072a5
commit
3b5cc26fec
29 changed files with 645 additions and 149 deletions
|
@ -695,10 +695,18 @@ export function isGIF(attachments?: ReadonlyArray<AttachmentType>): boolean {
|
|||
return hasFlag && isVideoAttachment(attachment);
|
||||
}
|
||||
|
||||
export function hasNotDownloaded(attachment?: AttachmentType): boolean {
|
||||
export function isDownloaded(attachment?: AttachmentType): boolean {
|
||||
return Boolean(attachment && attachment.path);
|
||||
}
|
||||
|
||||
export function hasNotResolved(attachment?: AttachmentType): boolean {
|
||||
return Boolean(attachment && !attachment.url);
|
||||
}
|
||||
|
||||
export function isDownloading(attachment?: AttachmentType): boolean {
|
||||
return Boolean(attachment && attachment.downloadJobId && attachment.pending);
|
||||
}
|
||||
|
||||
export function hasVideoBlurHash(attachments?: Array<AttachmentType>): boolean {
|
||||
const firstAttachment = attachments ? attachments[0] : null;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue