Skip to content

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

core: do not send download event if notify is false

Abdullah Atta3ab104e000a2
diff --git a/packages/core/collections/attachments.js b/packages/core/collections/attachments.js
index f64a82464..02b140b9b 100644
--- a/packages/core/collections/attachments.js
+++ b/packages/core/collections/attachments.js
@@ -331,7 +331,9 @@ export default class Attachments extends Collection {
const { metadata, chunkSize } = attachment;
const filename = metadata.hash;
- sendAttachmentsProgressEvent("download", groupId, total, current);
+ if (notify)
+ sendAttachmentsProgressEvent("download", groupId, total, current);
+
const isDownloaded = await this._db.fs.downloadFile(
groupId,
filename,