Skip to content

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

mobile: show error on file check failed

ammarahm-edb9040a9358fb
diff --git a/apps/mobile/app/components/attachments/actions.js b/apps/mobile/app/components/attachments/actions.js
index 6d16c9a6e..e6398dda6 100644
--- a/apps/mobile/app/components/attachments/actions.js
+++ b/apps/mobile/app/components/attachments/actions.js
@@ -102,15 +102,21 @@ const Actions = ({ attachment, setAttachments, fwdRef }) => {
if (res.failed) {
db.attachments.markAsFailed(attachment.id, res.failed);
setFailed(res.failed);
+ ToastEvent.show({
+ heading: "File check failed with error: " + res.failed,
+ type: "error",
+ context: "local"
+ });
} else {
setFailed(null);
db.attachments.markAsFailed(attachment.id, null);
+ ToastEvent.show({
+ heading: "File check passed",
+ type: "success",
+ context: "local"
+ });
}
- ToastEvent.show({
- heading: "File check passed",
- type: "success",
- context: "local"
- });
+
setAttachments([...db.attachments.all]);
setLoading({
name: null