diff --git a/apps/mobile/app/services/notifications.ts b/apps/mobile/app/services/notifications.ts index 5aaef8a61..945c3c2ab 100644 --- a/apps/mobile/app/services/notifications.ts +++ b/apps/mobile/app/services/notifications.ts @@ -262,7 +262,7 @@ const onEvent = async ({ type, detail }: Event) => { if (status.isInternetReachable) { try { if (!globalThis["IS_MAIN_APP_RUNNING" as never]) { - await db.sync(false, false); + await db.sync({ type: "send", force: false }); } else { console.log("main app running, skipping sync"); } @@ -904,7 +904,7 @@ async function pinNote(id: string) { const note = db.notes?.note(id as string) as any; let text = await convertNoteToText(note as any, false); if (!text) text = ""; - let html = text.replace(/\n/g, "
"); + const html = text.replace(/\n/g, "
"); Notifications.displayNotification({ title: note.title, message: note.headline || text, diff --git a/apps/mobile/app/services/sync.js b/apps/mobile/app/services/sync.js index 6324d95a6..0be131034 100644 --- a/apps/mobile/app/services/sync.js +++ b/apps/mobile/app/services/sync.js @@ -79,7 +79,11 @@ const run = async ( try { await BackgroundSync.doInBackground(async () => { try { - await db.sync(full, forced, lastSyncTime); + await db.sync({ + type: full ? "full" : "send", + force: forced, + lastSyncTime + }); } catch (e) { error = e; } diff --git a/apps/mobile/share/share.js b/apps/mobile/share/share.js index 97e5fd000..8d729966c 100644 --- a/apps/mobile/share/share.js +++ b/apps/mobile/share/share.js @@ -295,7 +295,7 @@ const ShareView = ({ quicknote = false }) => { try { if (!globalThis["IS_MAIN_APP_RUNNING"]) { - await db.sync(false, false); + await db.sync({ type: "send", force: false }); } else { console.log("main app running, skipping sync"); }