Merge pull request #1 from ericszimmermann/ez_snr_multibyte2

Multibyte Support for SNR-Indicator, channel message_bubble and Setting
This commit is contained in:
PacoX
2026-05-19 10:14:03 +02:00
committed by GitHub
47 changed files with 438 additions and 119 deletions
+25 -17
View File
@@ -488,11 +488,17 @@ class _ChannelMessagePathMapScreenState
? Uint8List.fromList(selectedPathTmp.reversed.toList())
: selectedPathTmp;
final selectedIndex = _indexForPath(selectedPath, observedPaths);
final width = (widget.message.pathHashWidth ?? connector.pathHashByteWidth)
.clamp(1, 4)
.toInt();
final hops = _buildPathHops(selectedPath, connector, context.l10n, width);
final width =
(widget.message.pathHashWidth ?? connector.pathHashByteWidth)
.clamp(1, 4)
.toInt();
final selectedIndex = _indexForPath(selectedPathTmp, observedPaths);
final hops = _buildPathHops(
selectedPath,
connector,
context.l10n,
width,
);
final points = <LatLng>[];
@@ -610,14 +616,18 @@ class _ChannelMessagePathMapScreenState
bounds: bounds,
),
if (observedPaths.length > 1)
_buildPathSelector(context, observedPaths, selectedIndex, (
index,
) {
setState(() {
_selectedPath = observedPaths[index].pathBytes;
_focusedHopIndex = null;
});
}),
_buildPathSelector(
context,
observedPaths,
selectedIndex,
width,
(index) {
setState(() {
_selectedPath = observedPaths[index].pathBytes;
_focusedHopIndex = null;
});
},
),
if (points.isEmpty)
Center(
child: Card(
@@ -643,13 +653,11 @@ class _ChannelMessagePathMapScreenState
BuildContext context,
List<_ObservedPath> paths,
int selectedIndex,
int hashByteWidth,
ValueChanged<int> onSelected,
) {
final l10n = context.l10n;
final width = context.read<MeshCoreConnector>().pathHashByteWidth.clamp(
1,
4,
);
final width = hashByteWidth.clamp(1, 4);
final selectedPath = paths[selectedIndex];
final label = selectedPath.isPrimary
? l10n.channelPath_primaryPath(selectedIndex + 1)