Settings: plain test notification + foreground banner delegate

- New 'Send plain test notification' button fires with zero criteria checks
  (no geofence, no cheapest check, no permission gate) to isolate delivery
  and tap behaviour
- ProximityMonitor is now the UNUserNotificationCenter delegate: banners
  show even in the foreground (system suppresses them otherwise), and taps
  complete the 'open FuelBoard' action
This commit is contained in:
FuelBoard Contributor
2026-08-12 09:24:59 +01:00
parent d6550409df
commit ae37e224c6
2 changed files with 49 additions and 2 deletions
+6 -1
View File
@@ -59,10 +59,15 @@ struct SettingsView: View {
.font(.footnote)
.foregroundStyle(.secondary)
}
Button {
ProximityMonitor.sendPlainTestNotification()
} label: {
Label("Send plain test notification", systemImage: "bell.slash.fill")
}
} header: {
Text("Alerts")
} footer: {
Text("Sends a notification exactly like a real price alert for \(alertsFuel.displayName.lowercased()) within \(distanceUnit.format(alertsRadiusKM)). Tapping it opens FuelBoard — just like a real alert.")
Text("The first button sends a notification shaped like a real price alert for \(alertsFuel.displayName.lowercased()) within \(distanceUnit.format(alertsRadiusKM)). The second fires with no criteria at all — no geofence, no cheapest check — just to verify a notification appears and tapping it opens FuelBoard.")
}
Section {