Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

mobile: changes related to download cancellation

Abdullah Atta02830372897e
diff --git a/apps/mobile/app/components/attachments/actions.js b/apps/mobile/app/components/attachments/actions.js
index bea5d0e41..4eb194e49 100644
--- a/apps/mobile/app/components/attachments/actions.js
+++ b/apps/mobile/app/components/attachments/actions.js
@@ -64,7 +64,7 @@ const Actions = ({ attachment, setAttachments, fwdRef }) => {
name: "Download",
onPress: async () => {
if (currentProgress) {
- await db.fs.cancel(attachment.metadata.hash, "download");
+ await db.fs.cancel(attachment.metadata.hash);
useAttachmentStore.getState().remove(attachment.metadata.hash);
}
downloadAttachment(attachment.metadata.hash, false);
diff --git a/apps/mobile/app/components/attachments/attachment-item.js b/apps/mobile/app/components/attachments/attachment-item.js
index 0433c0cfe..ad24b8d47 100644
--- a/apps/mobile/app/components/attachments/attachment-item.js
+++ b/apps/mobile/app/components/attachments/attachment-item.js
@@ -132,7 +132,7 @@ export const AttachmentItem = ({
activeOpacity={0.9}
onPress={() => {
if (encryption || !pressable) return;
- db.fs.cancel(attachment.metadata.hash, currentProgress.type);
+ db.fs.cancel(attachment.metadata.hash);
setCurrentProgress(null);
}}
style={{