Add Contact and Channelsettings to explicitly enable Picture preview.

This commit is contained in:
ericz committed 2026-08-10 22:21:10 +02:00
1 parent b137dd8fe1
commit d920449cbb
31 files changed
+421 -56

No files matched your search

+12
View File
@@ -1533,6 +1533,7 @@ class _ChannelsScreenState extends State<ChannelsScreen>
final pskController = TextEditingController(text: channel.pskHex);
bool smazEnabled = connector.isChannelSmazEnabled(channel.index);
bool cyr2latEnabled = connector.isChannelCyr2LatEnabled(channel.index);
bool imagesEnabled = connector.isChannelImagesEnabled(channel.index);
String? selectedCyr2LatProfileId = connector.getChannelCyr2LatProfileId(
channel.index,
);
@@ -1635,6 +1636,13 @@ class _ChannelsScreenState extends State<ChannelsScreen>
),
),
],
SwitchListTile(
contentPadding: EdgeInsets.zero,
title: Text(sheetContext.l10n.messageImage_enable),
value: imagesEnabled,
onChanged: (value) =>
setSheetState(() => imagesEnabled = value),
),
const SizedBox(height: 24),
],
),
@@ -1684,6 +1692,10 @@ class _ChannelsScreenState extends State<ChannelsScreen>
channel.index,
cyr2latEnabled,
);
await connector.setChannelImagesEnabled(
channel.index,
imagesEnabled,
);
await connector.setChannelCyr2LatProfileId(
channel.index,
selectedCyr2LatProfileId,