Skip to content

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

show error if note not found

ammarahm-ed2f5e03e1de1e
diff --git a/apps/mobile/src/components/attachments/actions.js b/apps/mobile/src/components/attachments/actions.js
index ea9567ab8..825525966 100644
--- a/apps/mobile/src/components/attachments/actions.js
+++ b/apps/mobile/src/components/attachments/actions.js
@@ -253,7 +253,16 @@ const Actions = ({ attachment, setAttachments, fwdRef }) => {
{notes.map(item => (
<PressableButton
onPress={async () => {
- if (item.type === 'notfound') return;
+ if (item.type === 'notfound') {
+ ToastEvent.show({
+ heading: 'Note not found',
+ message:
+ 'A note with the given id was not found. Maybe you have deleted the note or moved it to trash already.',
+ type: 'error',
+ context: 'local'
+ });
+ return;
+ }
eSendEvent(eCloseProgressDialog, contextId);
await sleep(150);
eSendEvent(eCloseAttachmentDialog);