feat: remember show images per sender (#378)
## 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) Co-authored-by: Thomas SharedInbox <sharedinbox@thomas-guettler.de> Reviewed-on: https://codeberg.org/guettli/sharedinbox/pulls/378
This commit was merged in pull request #378.
This commit is contained in:
committed by
guettli
co-authored by
guettli
Thomas SharedInbox
parent
5e029a1365
commit
692fa14d4d
@@ -1 +1 @@
|
||||
const int dbSchemaVersion = 36;
|
||||
const int dbSchemaVersion = 37;
|
||||
|
||||
@@ -5,4 +5,8 @@ abstract class UserPreferencesRepository {
|
||||
Future<void> updateMenuPosition(MenuPosition position);
|
||||
Future<void> updateMailViewButtonPosition(MenuPosition position);
|
||||
Future<void> updateAfterMailViewAction(AfterMailViewAction action);
|
||||
|
||||
Stream<List<String>> observeTrustedImageSenders();
|
||||
Future<void> addTrustedImageSender(String senderEmail);
|
||||
Future<void> removeTrustedImageSender(String senderEmail);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user