Alerts tab: picker-style config matching Live Activity; move Live Activity there

- Alerts section restyled to mirror the Live Activity section: one section
  with toggle + Fuel picker + Radius picker (was segmented fuel + slider)
- Alert radius options expanded to 1/2/3/5/8/10/15/20 (display unit, snapped
  to nearest option; stored km unchanged; validation widened to 33 km)
- Live Activity section moved from Settings into the Alerts tab so both
  'notify while driving' surfaces sit together
- SettingsView loses the Live Activity bindings/section
This commit is contained in:
FuelBoard Contributor
2026-08-12 22:30:54 +01:00
parent a721ccd187
commit 7f7c0fff03
4 changed files with 66 additions and 74 deletions
+6 -1
View File
@@ -482,8 +482,13 @@ struct FuelStore {
saveString(enabled ? "1" : "0", service: alertsEnabledKey)
}
/// Alert trigger-radius options (in the user's display unit, mapped to km
/// on selection). Expanded beyond the Live Activity's 5/10/15 so approach
/// alerts can trigger close (13) or wide (up to 20).
static let alertRadiusOptions = [1, 2, 3, 5, 8, 10, 15, 20]
static func loadAlertsRadius() -> Double {
if let raw = loadString(service: alertsRadiusKey), let value = Double(raw), value >= 1, value <= 10 {
if let raw = loadString(service: alertsRadiusKey), let value = Double(raw), value >= 1, value <= 33 {
return value
}
return 3.0