Fix undownloadable attachment check to require download error

This commit is contained in:
ayumi-signal
2025-01-17 09:34:22 -08:00
committed by GitHub
parent 7a6b5ffe09
commit 1bab28239a
4 changed files with 64 additions and 37 deletions
+6
View File
@@ -1268,6 +1268,12 @@ export function isDownloadable(attachment: AttachmentType): boolean {
);
}
export function isPermanentlyUndownloadable(
attachment: AttachmentType
): boolean {
return Boolean(!isDownloadable(attachment) && attachment.error);
}
export function isAttachmentLocallySaved(
attachment: AttachmentType
): attachment is LocallySavedAttachment {