Show return distance on station rows
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user