mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-27 05:38:12 +00:00
Adds logic around downloading stories
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user