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:
zjs81 committed 2026-10-24 22:01:29 -07:00
1 parent 7f5f71d070
commit 79e3668c18
31 files changed
+381 -33

No files matched your search

+5
View File
@@ -12,6 +12,7 @@ import 'screens/chrome_required_screen.dart';
import 'utils/platform_info.dart';
import 'connector/meshcore_connector.dart';
import 'helpers/message_url_image_helper.dart';
import 'models/image_codec_support.dart';
import 'screens/scanner_screen.dart';
import 'services/image_chunk_transport.dart';
@@ -139,10 +140,14 @@ void main() async {
notificationService.setPublicIpfsGateway(
appSettingsService.settings.publicIpfsGateway,
);
MessageUrlImageHelper.loadLinkImages.value =
appSettingsService.settings.loadLinkImages;
appSettingsService.addListener(() {
notificationService.setPublicIpfsGateway(
appSettingsService.settings.publicIpfsGateway,
);
MessageUrlImageHelper.loadLinkImages.value =
appSettingsService.settings.loadLinkImages;
});
await notificationService.initialize();
await backgroundService.initialize();