Simplify station financial verdicts

This commit is contained in:
FuelBoard Contributor
2026-10-17 19:55:55 +01:00
parent 7aaaffa1c5
commit c6e252d194
7 changed files with 94 additions and 28 deletions
+13
View File
@@ -242,6 +242,19 @@ extension FuelSavingsResult {
func capsuleHeadline() -> String {
headline(compact: true)
}
/// Short, amount-free verdict used only by station listing rows. The detail
/// sheet continues to use `capsuleHeadline()` so its full monetary verdict is
/// unchanged. Confidence follows the existing journey provenance exactly.
func listingCapsuleHeadline() -> String {
let approximate = journeyConfidence.isEstimated ? " (approx.)" : ""
switch status {
case .worthTheDrive: return "Saves\(approximate)"
case .notWorthTheDrive: return "Costs more\(approximate)"
case .breakEven: return "Break even\(approximate)"
case .baseline: return Self.baselineHeadline
}
}
}
/// One station's journey distance, plus how it was obtained.