Show return distance on station rows

This commit is contained in:
FuelBoard Contributor
2026-10-14 08:19:14 +01:00
parent 4811b1cfa5
commit 2ed9cbf4e8
4 changed files with 22 additions and 3 deletions
+12
View File
@@ -1722,11 +1722,23 @@ struct StationDistanceDisplay: Equatable {
return isApproximate ? "Approx. \(text)" : text
}
/// Row/sheet label that keeps the one-way station distance primary, then
/// adds the out-and-back distance in brackets. This matches Best Value's
/// "extra return travel" basis without changing the actual distance model.
func labelWithReturn(unit: DistanceUnit) -> String {
"\(label(unit: unit)) (\(unit.format(km * 2)) return)"
}
/// VoiceOver form of `label(unit:)`.
func spokenLabel(unit: DistanceUnit) -> String {
let text = unit.spoken(km)
return isApproximate ? "Approximately \(text)" : text
}
/// VoiceOver form of `labelWithReturn(unit:)`.
func spokenLabelWithReturn(unit: DistanceUnit) -> String {
"\(spokenLabel(unit: unit)), \(unit.spoken(km * 2)) return"
}
}
/// Cached Apple-Maps road distances for nearby stations (see