Best Value: one price age instead of a source breakdown
Dated pricing had crowded More info and the station rows, and most of the extra copy described a distinction the data cannot make: every station carries a single station-wide timestamp, so "grade-specific vs station-wide" never varied in practice. - More info shows one row, "Price updated 28h ago" (or "Not provided"), replacing the separate station-report and fuel-update-time rows and the blanket "price freshness is not confirmed" label. - Rows and the detail sheet stay quiet when a saving is shown; only an ineligible comparison explains itself. Provisional savings already read as estimates from the capsule, so the fuel-named warning lines are gone. - Freshness/eligibility logic is unchanged: it still gates the baseline and still supports grade-specific timestamps for when the relay emits them. - Tests updated; localisation keys for the removed copy dropped.
This commit is contained in:
@@ -213,20 +213,10 @@ struct StationDetailView: View {
|
||||
LabeledContent("Distance", value: distance.labelWithReturn(unit: distanceUnit))
|
||||
.monospacedDigit()
|
||||
}
|
||||
if let reportAge = priceFreshness.stationReportAgeLabel {
|
||||
LabeledContent("Station price report", value: reportAge)
|
||||
.monospacedDigit()
|
||||
}
|
||||
LabeledContent("\(selectedFuel.displayName) update time", value: priceFreshness.selectedFuelUpdateLabel)
|
||||
LabeledContent("Price updated", value: priceFreshness.updateAgeLabel)
|
||||
.monospacedDigit()
|
||||
LabeledContent("\(selectedFuel.displayName) price", value: selectedFuelPriceText)
|
||||
.monospacedDigit()
|
||||
if priceFreshness.warning {
|
||||
Label("Price freshness is not confirmed for \(selectedFuel.displayName)",
|
||||
systemImage: "exclamationmark.triangle.fill")
|
||||
.font(.subheadline.weight(.semibold))
|
||||
.foregroundStyle(.orange)
|
||||
}
|
||||
ForEach(StationNotice.notices(for: station)) { notice in
|
||||
Label(notice.title, systemImage: notice.symbolName)
|
||||
.font(.subheadline.weight(.semibold))
|
||||
|
||||
Reference in New Issue
Block a user