 Thomas SharedInboxandClaude Sonnet 4.6
|
81e2eb908d
|
feat(U4): background sync and local notifications for new mail
- Add flutter_local_notifications and workmanager packages
- Add notification_service.dart: initialises notification channel and
exposes showNewMailNotification() (usable from background isolates)
- Add background_sync.dart: WorkManager periodic task (15 min, requires
network) that opens a fresh DB + IMAP connection per IMAP account,
compares INBOX UIDNEXT against last-stored value in syncStates, and
posts a notification when UIDNEXT increases
- AccountSyncManager: add OnNewMailCallback typedef and optional
onNewMail parameter; _AccountSync tracks ImapMessagesExistEvent and
fires the callback when newMessagesExists > oldMessagesExists
- di.dart: wire showNewMailNotification as onNewMail callback
- main.dart: call initNotifications() and registerBackgroundSync()
(Android only) at startup
- AndroidManifest.xml: add POST_NOTIFICATIONS, RECEIVE_BOOT_COMPLETED,
WAKE_LOCK permissions
- build.gradle.kts: bump minSdk to 23 (workmanager requirement)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-05-14 00:50:53 +02:00 |
|