Skip to content

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

mobile: remove orphaned attachments on app launch

Ammar Ahmed07a481f002e5
diff --git a/apps/mobile/app/hooks/use-app-events.tsx b/apps/mobile/app/hooks/use-app-events.tsx
index dce2bb366..6ed4fcebe 100644
--- a/apps/mobile/app/hooks/use-app-events.tsx
+++ b/apps/mobile/app/hooks/use-app-events.tsx
@@ -537,6 +537,7 @@ const initializeDatabase = async (password?: string) => {
Notifications.restorePinnedNotes();
expiringNotesTimer();
deleteDCacheFiles();
+ db.attachments.removeOrphaned();
}
Walkthrough.init();
};