Settings: price display toggle — station sign (£129.9) vs pounds & pence (£1.299); display-only, all surfaces (list, widgets, Live Activity, Siri cards); Siri dialog stays speech-safe pounds
This commit is contained in:
@@ -127,9 +127,10 @@ extension FuelBoardLiveActivityAttributes.ContentState {
|
||||
FuelStore.loadDistanceUnit().format(distanceKM)
|
||||
}
|
||||
|
||||
/// £ price string from pence, e.g. 161.9 -> "£1.619".
|
||||
/// Price string from pence, in the user's chosen display style
|
||||
/// (station sign "£129.9" or pounds "£1.299").
|
||||
var priceText: String {
|
||||
String(format: "£%.3f", pricePence / 100)
|
||||
FuelStore.priceText(pricePence)
|
||||
}
|
||||
|
||||
/// Apple Maps directions URL to the pinned station.
|
||||
|
||||
@@ -395,7 +395,7 @@ struct FuelPriceWidgetView: View {
|
||||
.font(.headline)
|
||||
.lineLimit(1)
|
||||
if let price = station.prices[entry.fuel] {
|
||||
Text(String(format: "£%.3f", price / 100))
|
||||
Text(FuelStore.priceText(price))
|
||||
.font(.system(size: 26, weight: .bold).monospaced())
|
||||
.foregroundStyle(.green)
|
||||
}
|
||||
@@ -455,7 +455,7 @@ struct FuelPriceWidgetView: View {
|
||||
Circle()
|
||||
.fill(ragColor(for: price, cheapest: cheapest))
|
||||
.frame(width: 6, height: 6)
|
||||
Text(String(format: "£%.3f", price / 100))
|
||||
Text(FuelStore.priceText(price))
|
||||
.font(.caption.weight(.bold).monospaced())
|
||||
.foregroundStyle(.primary)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user