From ee359770ce963e074103f6e81dec9d00ece5098f Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Wed, 26 Apr 2023 08:53:27 +0500 Subject: [PATCH] mobile: always load notes on init --- apps/mobile/app/services/notifications.ts | 5 +++-- apps/mobile/share/store.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) 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 = {