feat(R2): force full sync escape hatch in account edit screen #22

Merged
guettlibot merged 1 commits from task/r2-force-resync into main 2026-05-13 20:57:37 +00:00
guettlibot commented 2026-05-13 20:54:22 +00:00 (Migrated from codeberg.org)

Adds a user-facing escape hatch for when the local DB falls out of sync with the server.

Changes:

  • EmailRepository.clearForResync() / MailboxRepository.clearForResync() — new interface methods that truncate local emails, mailboxes, pending changes, and sync-state checkpoints. EmailBodies are preserved (FK temporarily disabled) so previously-downloaded content survives the reset.
  • AccountSyncManager.forceResync() — stops the existing loop, calls both clear methods, then rebuilds and restarts the loop.
  • Edit account screen: "Force full sync" button (with confirmation dialog) triggers the above; spinner shown while running.

Closes part of #19

Adds a user-facing escape hatch for when the local DB falls out of sync with the server. **Changes:** - `EmailRepository.clearForResync()` / `MailboxRepository.clearForResync()` — new interface methods that truncate local emails, mailboxes, pending changes, and sync-state checkpoints. EmailBodies are preserved (FK temporarily disabled) so previously-downloaded content survives the reset. - `AccountSyncManager.forceResync()` — stops the existing loop, calls both clear methods, then rebuilds and restarts the loop. - Edit account screen: "Force full sync" button (with confirmation dialog) triggers the above; spinner shown while running. Closes part of #19
Sign in to join this conversation.