mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-02-23 19:49:56 +01:00
web: fix encryption progress when attaching files
This commit is contained in:
committed by
Abdullah Atta
parent
f1111191b1
commit
cdcdc43cad
@@ -240,14 +240,13 @@ function withProgress<T>(
|
||||
({ type, total, loaded }: AttachmentProgress) => {
|
||||
if (type !== "encrypt") return;
|
||||
report({
|
||||
current: loaded,
|
||||
total: total,
|
||||
current: Math.round((loaded / total) * 100),
|
||||
total: 100,
|
||||
text: file.name
|
||||
});
|
||||
}
|
||||
);
|
||||
event.unsubscribe();
|
||||
return action();
|
||||
return action().finally(() => event.unsubscribe());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user