mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-11 16:30:28 +00:00
fix: Prevent invalid map bounds #123
This commit is contained in:
@@ -169,8 +169,13 @@ class _DiscoveryScreenState extends State<DiscoveryScreen> {
|
||||
});
|
||||
|
||||
try {
|
||||
final contactsProvider = context.read<ContactsProvider>();
|
||||
for (final advert in adverts) {
|
||||
if (!mounted) break;
|
||||
// Skip already-resolved contacts
|
||||
if (contactsProvider.findContactByKey(advert.publicKey) != null) {
|
||||
continue;
|
||||
}
|
||||
await _resolveAdvert(advert);
|
||||
}
|
||||
} finally {
|
||||
|
||||
@@ -980,7 +980,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
builder: (context) => SimpleDialog(
|
||||
title: const Text('Route path byte size'),
|
||||
children: [
|
||||
for (final value in [1, 2, 3])
|
||||
for (final value in RouteHashPreferences.supportedSizes)
|
||||
SimpleDialogOption(
|
||||
onPressed: () => Navigator.of(context).pop(value),
|
||||
child: Row(
|
||||
@@ -990,7 +990,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text('$value byte${value == 1 ? '' : 's'}'),
|
||||
Text('$value-byte (max ${64 ~/ value} hops)'),
|
||||
Text(
|
||||
'Use ${value * 2} hex characters per hop',
|
||||
style: Theme.of(context).textTheme.bodySmall,
|
||||
|
||||
Reference in New Issue
Block a user