Files
sharedinbox/lib
Thomas SharedInboxandClaude Sonnet 4.6 3ef4ec3094 fix: guard against empty IMAP fetch message list (#339)
Replace unsafe .first on fetch.messages with .firstOrNull + early throw in
getEmailBody, downloadAttachment, and fetchRawRfc822, so a UID-expunged or
network-hiccup response gives a descriptive StateError instead of the
opaque "No element" crash. Also add snapshot.hasError handling in the
FutureBuilder so users see an error message rather than an infinite spinner.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01 18:05:25 +02:00
..