Retire the Best Value proximity alert option; move Key sheet copy into a tested model

- Alerts: drop the alert-type picker and the Best Value alert path, so
  proximity alerts always follow the cheapest station. A stored `bestValue`
  selection now falls back to cheapest when loaded.
- Key sheet: the price-rating, savings, station-label and favourite wording
  comes from `KeySheetContent` in Shared/FuelSavings.swift — a Foundation-only
  model with tests that pin the exact meaning of each indicator — and the
  sheet is built from that model rather than inline strings.
- BACKLOG: record the plan to restore Best Value proximity alerts behind one
  shared evaluator (user-location baseline, a single disclosed qualification
  rule, and real/Test alert parity).
- Bump CURRENT_PROJECT_VERSION to 29.
This commit is contained in:
FuelBoard Contributor
2026-10-18 17:16:12 +01:00
parent c331f3d663
commit 6cbb083208
11 changed files with 355 additions and 225 deletions
+5 -3
View File
@@ -701,10 +701,12 @@ struct FuelStore {
}
static func loadAlertsMode() -> AlertMode {
if let raw = loadString(service: alertsModeKey), let mode = AlertMode(rawValue: raw) {
return mode
guard let raw = loadString(service: alertsModeKey),
let mode = AlertMode(rawValue: raw),
mode == .cheapest else {
return .cheapest
}
return .cheapest
return mode
}
static func saveAlertsMode(_ mode: AlertMode) {