feat: remember show images per sender #378

Merged
guettlibot merged 2 commits from refs/pull/378/head into main 2026-06-03 23:41:51 +00:00
guettlibot commented 2026-06-03 21:46:49 +00:00 (Migrated from codeberg.org)

Summary

Closes #377

  • Adds a new ImageTrustedSenders Drift table (schema v37) that stores email addresses for which remote images are loaded automatically (per device, not per account)
  • When the user taps "Load remote images", the sender's address is saved and a 3-second snackbar appears with a "Settings" hyperlink to undo the choice in preferences
  • Both EmailDetailScreen and ThreadDetailScreen check the trusted senders list on open and auto-load images for known senders
  • The Preferences screen gains a new "Trusted image senders" section listing all saved senders with individual remove buttons

Test plan

  • dart run build_runner build regenerates database.g.dart cleanly (schema v37)
  • flutter analyze — no issues
  • Migration test updated: checks image_trusted_senders table exists after upgrade and fresh install
  • FakeUserPreferencesRepository updated with three new interface methods
  • All 490 unit + widget tests pass (1 pre-existing golden test failure unrelated to this change)

🤖 Generated with Claude Code

## Summary Closes #377 - Adds a new `ImageTrustedSenders` Drift table (schema v37) that stores email addresses for which remote images are loaded automatically (per device, not per account) - When the user taps "Load remote images", the sender's address is saved and a 3-second snackbar appears with a "Settings" hyperlink to undo the choice in preferences - Both `EmailDetailScreen` and `ThreadDetailScreen` check the trusted senders list on open and auto-load images for known senders - The Preferences screen gains a new "Trusted image senders" section listing all saved senders with individual remove buttons ## Test plan - [x] `dart run build_runner build` regenerates `database.g.dart` cleanly (schema v37) - [x] `flutter analyze` — no issues - [x] Migration test updated: checks `image_trusted_senders` table exists after upgrade and fresh install - [x] `FakeUserPreferencesRepository` updated with three new interface methods - [x] All 490 unit + widget tests pass (1 pre-existing golden test failure unrelated to this change) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.