Add a setting to show link images in all chats by default

'Show link images in all chats by default' (default off) applies to
every channel and contact without an explicit per-chat choice: the
per-chat setting is now unset/on/off and resolves to perChat ?? default.
The 'Load images from links' master switch still overrides it.
This commit is contained in:
zjs81 committed 2026-10-24 22:01:30 -07:00
1 parent 79e3668c18
commit a4670a9275
30 files changed
+330 -16

No files matched your search

+7
View File
@@ -450,6 +450,13 @@ void main() {
expect(AppSettings.fromJson(saved).loadLinkImages, isFalse);
});
test('show link images by default is off and round-trips', () {
expect(AppSettings().showLinkImagesByDefault, isFalse);
expect(AppSettings.fromJson({}).showLinkImagesByDefault, isFalse);
final saved = AppSettings(showLinkImagesByDefault: true).toJson();
expect(AppSettings.fromJson(saved).showLinkImagesByDefault, isTrue);
});
test('public IPFS gateway defaults to ipfs.io when never set', () {
expect(
AppSettings.fromJson({}).publicIpfsGateway,