Favourites tab: fuel-type selector gets the same coloured pump icons
- FuelTypeSegmentedPicker promoted to shared (was private in StationsView) and parameterised by fuel list so Favourites passes only fuels with favourites - Favourites tab swaps native .segmented picker for the capsule control with green/purple/grey fuelpump icons, matching Stations
This commit is contained in:
@@ -84,12 +84,10 @@ struct FavouritesView: View {
|
||||
}
|
||||
} else {
|
||||
Section("Fuel type") {
|
||||
Picker("Fuel type", selection: $fuel) {
|
||||
ForEach(availableFuels) { fuel in
|
||||
Text(fuel.shortName).tag(fuel)
|
||||
}
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
FuelTypeSegmentedPicker(
|
||||
selection: $fuel,
|
||||
fuels: availableFuels
|
||||
)
|
||||
}
|
||||
|
||||
Section("\(activeFuel.displayName) favourites — cheapest first") {
|
||||
|
||||
Reference in New Issue
Block a user