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