Implements bidirectional draft synchronisation between the local SQLite database and the server's IMAP Drafts folder.
Changes
Schema v24: adds imap_server_id nullable text column to drafts table; migration is guarded with from >= 4 to avoid a duplicate-column error when creating the table fresh (since m.createTable uses the latest schema)
DraftRepositoryImpl: accepts AccountRepository and optional ImapConnectFn; implements syncDrafts — creates/selects the Drafts IMAP folder, uploads local-only drafts via APPEND (stores returned UID), downloads server drafts not yet tracked locally
AccountSyncManager: accepts optional DraftRepository?; passes it to _AccountSync which calls syncDrafts at the start of each sync cycle
DI: draftRepositoryProvider now passes account repo + IMAP connect factory; syncManagerProvider wires in the draft repo
Implements bidirectional draft synchronisation between the local SQLite database and the server's IMAP Drafts folder.
## Changes
- **Schema v24**: adds `imap_server_id` nullable text column to `drafts` table; migration is guarded with `from >= 4` to avoid a duplicate-column error when creating the table fresh (since `m.createTable` uses the latest schema)
- **`SavedDraft` model**: adds `imapServerId` field
- **`DraftRepository` interface**: adds `syncDrafts(accountId, password)`
- **`DraftRepositoryImpl`**: accepts `AccountRepository` and optional `ImapConnectFn`; implements `syncDrafts` — creates/selects the Drafts IMAP folder, uploads local-only drafts via APPEND (stores returned UID), downloads server drafts not yet tracked locally
- **`AccountSyncManager`**: accepts optional `DraftRepository?`; passes it to `_AccountSync` which calls `syncDrafts` at the start of each sync cycle
- **DI**: `draftRepositoryProvider` now passes account repo + IMAP connect factory; `syncManagerProvider` wires in the draft repo
- **Tests**: added `syncDrafts` stub to `FakeDraftRepository`; updated `draft_repository_impl_test.dart` constructor calls; added `_StubAccounts` helper
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Implements bidirectional draft synchronisation between the local SQLite database and the server's IMAP Drafts folder.
Changes
imap_server_idnullable text column todraftstable; migration is guarded withfrom >= 4to avoid a duplicate-column error when creating the table fresh (sincem.createTableuses the latest schema)SavedDraftmodel: addsimapServerIdfieldDraftRepositoryinterface: addssyncDrafts(accountId, password)DraftRepositoryImpl: acceptsAccountRepositoryand optionalImapConnectFn; implementssyncDrafts— creates/selects the Drafts IMAP folder, uploads local-only drafts via APPEND (stores returned UID), downloads server drafts not yet tracked locallyAccountSyncManager: accepts optionalDraftRepository?; passes it to_AccountSyncwhich callssyncDraftsat the start of each sync cycledraftRepositoryProvidernow passes account repo + IMAP connect factory;syncManagerProviderwires in the draft reposyncDraftsstub toFakeDraftRepository; updateddraft_repository_impl_test.dartconstructor calls; added_StubAccountshelper