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
@@ -55,7 +55,7 @@ private struct FuelBoardLiveActivityView: View {
// MIDDLE fuel + station
VStack(alignment: .leading, spacing: 2) {
Text("Cheapest \(context.attributes.fuel.displayName)")
Text("Cheapest \(context.state.fuel.displayName)")
.font(.headline)
Text("\(context.state.stationName) · \(context.state.distanceText)")
.font(.subheadline)
@@ -94,7 +94,7 @@ private struct FuelBoardLiveActivityCompactView: View {
var body: some View {
VStack(alignment: .leading, spacing: 2) {
Text("Cheapest \(context.attributes.fuel.displayName)")
Text("Cheapest \(context.state.fuel.displayName)")
.font(.caption2)
.foregroundStyle(.secondary)
Text(context.state.stationName)