Key sheet: gate the How Best Value row on the feature, like the More info row
The More info row went inside the Best Value card's `if let fuelSavings`, but the Key sheet row was left ungated, so it stayed visible with Best Value switched off. It is now gated on `fuelSavingsSettings.isConfigured` — exactly the condition `savingsForStation` uses, i.e. the same gate as the card — so the two rows appear and disappear together. Verified on the simulator by toggling Best Value in Settings and scrolling the Key sheet to its end (four drags, sheet still up and its footer in view each time): - OFF: the row is absent at every scroll position, and the More info sheet shows neither the card nor the row; - ON: the row is present, and the More info card and its row are both back. 210 tests pass; Release builds.
This commit is contained in:
@@ -317,11 +317,14 @@ struct StationsView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// The explanation is its own sheet now, opened from this
|
// The explanation is its own sheet now, opened from this
|
||||||
// row. Deliberately NOT gated by Best Value: the Key sheet
|
// row. Gated exactly like the More info row and the Best
|
||||||
// is the legend and is reachable whatever the feature is
|
// Value card itself: `isConfigured` is the same condition
|
||||||
// doing.
|
// `savingsForStation` uses, so the row appears and
|
||||||
Section {
|
// disappears with the feature.
|
||||||
HowBestValueRow { showBestValueInfo = true }
|
if fuelSavingsSettings.isConfigured {
|
||||||
|
Section {
|
||||||
|
HowBestValueRow { showBestValueInfo = true }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.navigationTitle("Key")
|
.navigationTitle("Key")
|
||||||
|
|||||||
Reference in New Issue
Block a user