fix(block2): sharing config UX + discovery + labels (raw feedback batch)

From on-device feedback:
- Area is no longer shown as a raw geohash 'name'. 'Use my location' is the
  primary action; a human status line says whether your area is set (coarse,
  never exact). The geohash code + the relay servers moved under 'Advanced'
  (code field labelled 'a code like sp3e9 — not a place name'), which also
  brings back node/relay selection that had been fully hidden.
- Location denial no longer yanks you into system settings — returns quietly
  with an actionable inline message.
- Discovery no longer spins forever when nobody's sharing nearby: a timeout
  resolves 'searching' to the empty state.
- Home card 'Open market' -> 'Market' + 'Discover and share seeds nearby'
  (the word 'open' confused).

i18n en/es/pt; analyzer clean; the use-my-location test asserts the status flip.
This commit is contained in:
vjrj 2026-07-10 13:32:11 +02:00
parent d7136ec2c2
commit 5f87ad2d56
11 changed files with 208 additions and 90 deletions

View file

@ -20,16 +20,13 @@ class GeolocatorCoarseLocation implements CoarseLocationProvider {
if (permission == LocationPermission.denied) {
permission = await Geolocator.requestPermission();
}
// Give the user a way out of a permanent denial.
if (permission == LocationPermission.deniedForever) {
await Geolocator.openAppSettings();
return null;
}
if (permission == LocationPermission.denied) return null;
if (!await Geolocator.isLocationServiceEnabled()) {
await Geolocator.openLocationSettings();
// Denied (or turned off): return null quietly the UI shows an actionable
// message. We don't yank the user into system settings.
if (permission == LocationPermission.denied ||
permission == LocationPermission.deniedForever) {
return null;
}
if (!await Geolocator.isLocationServiceEnabled()) return null;
// A fresh coarse fix can take a while (or never come indoors); fall back
// to the last known position so the button stays responsive.