From 02830372897e6d9ada16c9d862c29f548609a804 Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Fri, 26 Jan 2024 16:17:53 +0500 Subject: [PATCH] mobile: changes related to download cancellation --- apps/mobile/app/components/attachments/actions.js | 2 +- apps/mobile/app/components/attachments/attachment-item.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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={{