Add an outbox folder: view, retry, and cancel queued sends

- New Outbox screen lists queued messages with status (Queued, or "Couldn't send" in
  red after a failed attempt), an app-bar Retry, and a per-message cancel.
- The inbox shows an "Outbox (N)" entry while anything is queued. Repository gains
  observeOutbox/cancelOutboxMessage/retryOutbox; OutboxDao.observeAll + OutboxMessage.
- SendScheduler now enqueues the drain with REPLACE rather than APPEND_OR_REPLACE so
  newly-queued mail and manual retries run promptly, overriding a pending retry-backoff
  (previously a queued message could sit behind an exponential backoff for minutes).
- assemble/test/lint green; verified on the Android 17 emulator — a message stuck from an
  earlier offline send showed as failed in the outbox, and tapping Retry (server back up)
  drained it to "Outbox is empty".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-27 16:39:36 -05:00
co-authored by Claude Opus 4.8
parent dc3147a138
commit 5c98f3ba1c
14 changed files with 246 additions and 3 deletions
+9
View File
@@ -49,6 +49,15 @@
<string name="draft_no_recipient">(no recipient)</string>
<string name="draft_delete">Delete draft</string>
<!-- Outbox -->
<string name="outbox_title">Outbox</string>
<string name="outbox_empty">Outbox is empty</string>
<string name="outbox_count">Outbox (%1$d)</string>
<string name="outbox_status_queued">Queued</string>
<string name="outbox_status_failed">Couldn\'t send — will retry</string>
<string name="outbox_cancel">Cancel send</string>
<string name="outbox_retry">Retry</string>
<!-- Reader -->
<string name="reader_reply">Reply</string>
<string name="attachments_title">Attachments</string>