Simplify station financial verdicts
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user