Live Activity: own fuel + distance config, independent of Stations tab

- Settings → Live Activity now has Fuel and Distance pickers (5/10/15,
  unit-aware) stored under fuelboard.liveActivityFuel / liveActivityRadiusMiles
- LiveActivityManager uses these instead of the Stations-tab selectedFuel /
  stationLimit; Stations changes no longer re-target the pill
- Fuel moved from Activity attributes into ContentState so changing fuel in
  Settings updates the RUNNING activity in place (no end+restart needed)
- Stations tab stays a pure data-interrogation + favourites surface
This commit is contained in:
FuelBoard Contributor
2026-08-12 20:58:05 +01:00
parent 04b233bf9a
commit fcb83f1eed
6 changed files with 82 additions and 20 deletions
+2 -1
View File
@@ -48,6 +48,7 @@ enum LiveActivityManager {
}
let state = FuelBoardLiveActivityAttributes.ContentState(
fuel: fuel,
stationID: best.id,
stationName: best.name,
brand: best.brand,
@@ -57,7 +58,7 @@ enum LiveActivityManager {
lng: best.lng,
updatedAt: Date()
)
let attributes = FuelBoardLiveActivityAttributes(fuel: fuel)
let attributes = FuelBoardLiveActivityAttributes()
if let current {
// Near the 8 h cap? End and re-request so the pill keeps living.