A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
fix: don't send 0-indexed progress
thecodrr3e184345a351
diff --git a/packages/core/api/sync/index.js b/packages/core/api/sync/index.jsindex a230f4bcc..f8284b566 100644--- a/packages/core/api/sync/index.js+++ b/packages/core/api/sync/index.js@@ -182,7 +182,7 @@ export default class Sync {for (var i = 0; i < attachments.length; ++i) {const attachment = attachments[i];const { hash } = attachment.metadata;- sendAttachmentsProgressEvent("upload", hash, attachments.length, i);+ sendAttachmentsProgressEvent("upload", hash, attachments.length, i + 1);const isUploaded = await this._db.fs.uploadFile(hash, hash);if (!isUploaded) throw new Error("Failed to upload file.");diff --git a/packages/core/collections/attachments.js b/packages/core/collections/attachments.jsindex 375204e16..6a4f5e011 100644--- a/packages/core/collections/attachments.js+++ b/packages/core/collections/attachments.js@@ -198,7 +198,7 @@ export default class Attachments extends Collection {}async _downloadMedia(hash, { total, current, groupId }, notify = true) {- sendAttachmentsProgressEvent("download", groupId, total, current);+ sendAttachmentsProgressEvent("download", groupId, total, current + 1);const isDownloaded = await this._db.fs.downloadFile(groupId, hash);if (!isDownloaded) return;