Tie buttons show full station name (not brand or address)

Action buttons for tied cheapest stations now read '<station name> ·
<distance>' (e.g. 'Tesco Express · 0.8 mi') instead of just the brand,
in both the live geofence path and the Settings real-data test.
This commit is contained in:
FuelBoard Contributor
2026-08-12 11:00:22 +01:00
parent 1f50d7dcf4
commit 9f579051e5
+2 -4
View File
@@ -207,12 +207,11 @@ final class ProximityMonitor: NSObject, ObservableObject, @preconcurrency CLLoca
// When several stations share the cheapest price, offer each as an
// action button so the user can pick which to get directions to.
let choices = ties.map { tie in
let tieBrand = tie.brand.isEmpty ? tie.name : tie.brand
let tieDistance: String = {
guard let location else { return unit.format(0) }
return unit.format(tie.distanceKM(to: location.lat, lng2: location.lng))
}()
return TieChoice(station: tie, buttonTitle: "\(tieBrand) · \(tieDistance)")
return TieChoice(station: tie, buttonTitle: "\(tie.name) · \(tieDistance)")
}
if choices.count > 1 {
@@ -393,12 +392,11 @@ final class ProximityMonitor: NSObject, ObservableObject, @preconcurrency CLLoca
fromLat: tieLat, lng: tieLng
)
let choices = tied.map { station in
let tieBrand = station.brand.isEmpty ? station.name : station.brand
let tieDistance: String = {
guard let location else { return unit.format(0) }
return unit.format(station.distanceKM(to: location.lat, lng2: location.lng))
}()
return TieChoice(station: station, buttonTitle: "\(tieBrand) · \(tieDistance)")
return TieChoice(station: station, buttonTitle: "\(station.name) · \(tieDistance)")
}
if choices.count > 1 {