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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user