Fix Release archive build for Best Value diagnostics; bump build to 26
This commit is contained in:
@@ -347,8 +347,12 @@ struct ContentView: View {
|
||||
return ordered
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
/// Compiled in EVERY configuration: the detail sheet's `journeyDiagnostics`
|
||||
/// argument is not conditional (an `#if` inside an argument list does not
|
||||
/// build), so this symbol must exist for Release/Archive too. Only the panel
|
||||
/// that renders it is `#if DEBUG`; Release returns nil and does no work.
|
||||
private func journeyDiagnostics(for station: FuelStation, baseline: FuelStation?) -> FuelSavingsJourneyDiagnostics? {
|
||||
#if DEBUG
|
||||
guard let location else { return nil }
|
||||
let stationDistance = FuelStore.roadDistanceDiagnostics(for: station, userLat: location.lat, userLng: location.lng)
|
||||
let baselineDiagnostics = baseline.map { FuelStore.roadDistanceDiagnostics(for: $0, userLat: location.lat, userLng: location.lng) }
|
||||
@@ -397,8 +401,12 @@ struct ContentView: View {
|
||||
("Net saving", result.map { FuelSavingsFormat.money($0.netSavingGBP) } ?? "—")
|
||||
]
|
||||
return FuelSavingsJourneyDiagnostics(rows: rows)
|
||||
#else
|
||||
return nil
|
||||
#endif
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
/// Last FB-DRIVE line printed, so the ranking (which runs on every render)
|
||||
/// only reports when the result actually changes.
|
||||
private static var lastDriveLogLine: String?
|
||||
|
||||
Reference in New Issue
Block a user