Handle loading state and error parsing in PathTraceMapScreen; update SNR indicator dialog content layout

This commit is contained in:
Winston Lowe 2026-02-15 17:16:56 -08:00
parent 75a7f437f6
commit 940a1be203
2 changed files with 16 additions and 1 deletions

View file

@ -166,6 +166,15 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen> {
});
}
if (code == respCodeErr) {
_timeoutTimer?.cancel();
if (!mounted) return;
setState(() {
_isLoading = false;
_failed2Loaded = true;
});
}
// Check if it's a binary response
if (frame.length > 8 &&
code == pushCodeTraceData &&
@ -178,6 +187,12 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen> {
}
}
} catch (e) {
_timeoutTimer?.cancel();
if (!mounted) return;
setState(() {
_isLoading = false;
_failed2Loaded = true;
});
// Handle any parsing errors gracefully
appLogger.error('Error parsing frame: $e', tag: 'PathTraceMapScreen');
}

View file

@ -150,7 +150,7 @@ class _SNRIndicatorState extends State<SNRIndicator> {
context: context,
builder: (context) => AlertDialog(
title: Text(l10n.snrIndicator_nearByRepeaters),
content: Expanded(
content: SizedBox(
child: Scrollbar(
child: ListView.separated(
padding: const EdgeInsets.symmetric(vertical: 4),