diff --git a/mobile/src/app/_layout.tsx b/mobile/src/app/_layout.tsx index 4b874c1..340dfd6 100644 --- a/mobile/src/app/_layout.tsx +++ b/mobile/src/app/_layout.tsx @@ -58,6 +58,12 @@ export default function RootLayout() { } async function flushQueuedNoteMutations(): Promise { + const pending = getNoteQueueSize(); + if (pending === 0) { + setQueueStatus({ pending: 0, lastFlushed: 0 }); + return; + } + const result = await flushNoteQueue().catch(() => ({ flushed: 0, failed: getNoteQueueSize() })); setQueueStatus({ pending: result.failed,