No third-party fetch without asking: gate GIFs, hide ML settings
build / build (push) Successful in 17m17s

- GifMessage gets autoLoad; chats pass their "images from URLs" switch
  (off by default), so a received GIF code no longer fetches from Giphy
  until tapped. Reply quotes follow the channel setting.
- Translation and image-message settings are hidden (kOnDeviceMl in
  lib/tth_fork.dart): without the native runtimes they cannot work and
  their buttons would only download models of up to 835 MB.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 5.5 committed 2026-10-19 13:13:16 +02:00
1 parent 59b64291c4
commit bfb3ef6128
6 files changed
+43 -8

No files matched your search

+9 -6
View File
@@ -21,6 +21,7 @@ import '../widgets/mesh_ui.dart';
import '../widgets/network_map_settings_section.dart';
import '../widgets/sync_progress_overlay.dart';
import '../widgets/translation_settings_section.dart';
import '../tth_fork.dart';
import '../helpers/snack_bar_builder.dart';
import 'map_cache_screen.dart';
@@ -80,11 +81,13 @@ class AppSettingsScreen extends StatelessWidget {
),
// IMAGE MESSAGES
SectionHeader(context.l10n.appSettings_imageMessagesSection),
MeshCard(
padding: EdgeInsets.zero,
child: _settingsCard(_buildImageMessagesContent),
),
if (kOnDeviceMl) ...[
SectionHeader(context.l10n.appSettings_imageMessagesSection),
MeshCard(
padding: EdgeInsets.zero,
child: _settingsCard(_buildImageMessagesContent),
),
],
// BATTERY
SectionHeader(context.l10n.appSettings_battery),
@@ -108,7 +111,7 @@ class AppSettingsScreen extends StatelessWidget {
),
// TRANSLATION (non-web only)
if (!kIsWeb) ...[
if (!kIsWeb && kOnDeviceMl) ...[
SectionHeader(context.l10n.translation_title),
const MeshCard(
padding: EdgeInsets.zero,
+4
View File
@@ -743,6 +743,7 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
child: GifMessage(
url:
'https://media.giphy.com/media/$gifId/giphy.gif',
autoLoad: urlImagesEnabled,
backgroundColor: Colors.transparent,
fallbackTextColor: textColor.withValues(
alpha: 0.7,
@@ -1055,6 +1056,9 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
borderRadius: BorderRadius.circular(4),
child: GifMessage(
url: 'https://media.giphy.com/media/$gifId/giphy.gif',
autoLoad: context.read<MeshCoreConnector>().isChannelUrlImagesEnabled(
widget.channel.index,
),
backgroundColor: colorScheme.surfaceContainerHighest,
fallbackTextColor: color,
maxSize: gifSize,
+1
View File
@@ -1339,6 +1339,7 @@ class _MessageBubble extends StatelessWidget {
child: GifMessage(
url:
'https://media.giphy.com/media/$gifId/giphy.gif',
autoLoad: urlImagesEnabled,
backgroundColor: Colors.transparent,
fallbackTextColor: textColor.withValues(
alpha: 0.7,