Test alert uses real data: actual cheapest station within radius

The first Settings test button no longer sends a hardcoded placeholder —
it runs the same criteria as a live alert (monitored fuel, alert radius,
current location) against the loaded stations and sends the REAL station
name, brand and price. Result line shown under the button; graceful
message when no stations or no sellers within radius.
This commit is contained in:
FuelBoard Contributor
2026-08-12 09:34:17 +01:00
parent ae37e224c6
commit 950844878c
3 changed files with 62 additions and 19 deletions
+2
View File
@@ -148,6 +148,8 @@ struct ContentView: View {
distanceUnit: $distanceUnit,
alertsFuel: alertsFuel,
alertsRadiusKM: alertsRadius,
testAlertResult: monitor.lastTestResult,
onTestAlert: { monitor.sendTestNotification() },
onShowOnboarding: { showOnboarding = true }
)
.tabItem { Label("Settings", systemImage: "gearshape.fill") }