Results filter is now search radius in miles (5/10/15); relay fetch scoped to radius, limit 500; changing miles re-fetches; caption shows stations within N miles
This commit is contained in:
@@ -80,9 +80,9 @@ struct StationsView: View {
|
||||
|
||||
if !stations.isEmpty {
|
||||
Divider()
|
||||
Picker("Show", selection: $stationLimit) {
|
||||
ForEach([10, 25, 50, 75, 100], id: \.self) { count in
|
||||
Text("\(count)").tag(count)
|
||||
Picker("Within", selection: $stationLimit) {
|
||||
ForEach(FuelStore.stationRadiusOptions, id: \.self) { miles in
|
||||
Text("\(miles) miles").tag(miles)
|
||||
}
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
@@ -90,7 +90,7 @@ struct StationsView: View {
|
||||
FuelStore.saveStationLimit(newValue)
|
||||
}
|
||||
.padding(.vertical, 2)
|
||||
Text("Showing \(stations.count) of \(totalCount) stations")
|
||||
Text("\(totalCount) stations within \(stationLimit) miles")
|
||||
.font(.caption2)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user