feat: station tap action toggle (open map vs more info)
Settings → Units gains a Tap station picker: Open map (default, historic behaviour — tap opens Apple Maps directions) or More info (tap shows a detail sheet with name, address, distance from current location, and a Directions button). Applies to Stations and Favourites tabs; persisted keychain-first as fuelboard.stationTapAction. Stations footer hint follows the setting.
This commit is contained in:
@@ -18,6 +18,7 @@ struct SettingsView: View {
|
||||
@ObservedObject var tipStore: TipStore
|
||||
@Binding var distanceUnit: DistanceUnit
|
||||
@Binding var priceDisplayStyle: PriceDisplayStyle
|
||||
@Binding var stationTapAction: StationTapAction
|
||||
@Binding var dataRefreshMode: DataRefreshMode
|
||||
/// The fuel + radius currently configured for alerts (mirrors the Alerts
|
||||
/// tab) so the test notification matches what real alerts will say.
|
||||
@@ -117,10 +118,19 @@ struct SettingsView: View {
|
||||
WidgetCenter.shared.reloadAllTimelines()
|
||||
WatchSyncManager.shared.pushSnapshot()
|
||||
}
|
||||
Picker("Tap station", selection: $stationTapAction) {
|
||||
ForEach(StationTapAction.allCases) { action in
|
||||
Text(action.displayName).tag(action)
|
||||
}
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
.onChange(of: stationTapAction) { _, newValue in
|
||||
FuelStore.saveStationTapAction(newValue)
|
||||
}
|
||||
} header: {
|
||||
Text("Units")
|
||||
} footer: {
|
||||
Text("Distances and search radii across the app, widget and alerts are shown in this unit. Prices can be shown as on a station sign (129.9) or in pounds and pence (£1.29⁹/L).")
|
||||
Text("Distances and search radii across the app, widget and alerts are shown in this unit. Prices can be shown as on a station sign (129.9) or in pounds and pence (£1.29⁹/L). Tapping a station either opens directions straight away or shows its details first.")
|
||||
}
|
||||
|
||||
Section {
|
||||
|
||||
Reference in New Issue
Block a user