Skip to content

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

mobile: always load notes on init

ammarahm-ed536dead44ddb
diff --git a/apps/mobile/app/services/notifications.ts b/apps/mobile/app/services/notifications.ts
index c73d903f8..ced4f0177 100644
--- a/apps/mobile/app/services/notifications.ts
+++ b/apps/mobile/app/services/notifications.ts
@@ -86,8 +86,9 @@ async function getNextMonthlyReminderDate(
}
async function initDatabase(notes = true) {
- if (db.isInitialized) return;
- await db.initCollections();
+ if (!db.isInitialized) {
+ await db.initCollections();
+ }
if (notes) {
await db.notes?.init();
}
diff --git a/apps/mobile/share/store.js b/apps/mobile/share/store.js
index 395b416b3..1b95f9e86 100644
--- a/apps/mobile/share/store.js
+++ b/apps/mobile/share/store.js
@@ -31,8 +31,8 @@ export async function initDatabase() {
if (!db.isInitialized) {
// Only load collections in database.
await db.initCollections();
- await db.notes.init();
}
+ await db.notes.init();
}
const StorageKeys = {