feat: add set-as-my-location from map long-press, connector and UI improvements

Add "Set as my location" option to the map long-press bottom sheet,
allowing users to set their device position directly from the map.
Includes connector, chat, contacts, and message retry service improvements.
This commit is contained in:
zjs81
2026-03-14 09:33:37 -07:00
parent e90742be25
commit 71f59d23df
37 changed files with 434 additions and 108 deletions
+16
View File
@@ -1509,6 +1509,22 @@ class _MapScreenState extends State<MapScreen> {
);
},
),
ListTile(
leading: const Icon(Icons.my_location),
title: Text(context.l10n.map_setAsMyLocation),
onTap: () async {
final messenger = ScaffoldMessenger.of(context);
final message = context.l10n.settings_locationUpdated;
Navigator.pop(sheetContext);
await connector.setNodeLocation(
lat: position.latitude,
lon: position.longitude,
);
await connector.refreshDeviceInfo();
if (!mounted) return;
messenger.showSnackBar(SnackBar(content: Text(message)));
},
),
ListTile(
leading: const Icon(Icons.close),
title: Text(context.l10n.common_cancel),