Add a global switch to stop loading images from links
'Load images from links' (default on) gates every link image fetch in MessageUrlImageHelper: chat previews, notification images, ipfs:// resolution and pyx/ibb scraping. Per-chat toggles keep their values but are disabled while it is off. IPFS uploads are unaffected.
This commit is contained in:
1 parent
7f5f71d070
commit
79e3668c18
31 files changed
+381
-33
No files matched your search
@@ -443,6 +443,13 @@ void main() {
|
||||
expect(settings.evictDiscoveredContactsEnabled, isFalse);
|
||||
});
|
||||
|
||||
test('load link images defaults on and round-trips through JSON', () {
|
||||
expect(AppSettings().loadLinkImages, isTrue);
|
||||
expect(AppSettings.fromJson({}).loadLinkImages, isTrue);
|
||||
final saved = AppSettings(loadLinkImages: false).toJson();
|
||||
expect(AppSettings.fromJson(saved).loadLinkImages, isFalse);
|
||||
});
|
||||
|
||||
test('public IPFS gateway defaults to ipfs.io when never set', () {
|
||||
expect(
|
||||
AppSettings.fromJson({}).publicIpfsGateway,
|
||||
|
||||
Reference in new issue
Block a user