Remove redundant comparison mode notice

This commit is contained in:
FuelBoard Contributor
2026-10-17 14:15:54 +01:00
parent 1b6184c035
commit f261b0b10a
+2 -9
View File
@@ -3,7 +3,6 @@ import SwiftUI
struct FuelSavingsAdjustmentView: View {
@Binding var amount: FuelSavingsFillAmount
@State private var unitChangeNotice: String?
@State private var showingComparisonHelp = false
private var range: ClosedRange<Double> {
@@ -71,11 +70,6 @@ struct FuelSavingsAdjustmentView: View {
Text("Adjust your fill-up amount for this visit. Your default won’t change.")
.font(.caption2)
.foregroundStyle(.secondary)
if let unitChangeNotice {
Text(unitChangeNotice)
.font(.caption2)
.foregroundStyle(.orange)
}
}
}
@@ -84,10 +78,9 @@ struct FuelSavingsAdjustmentView: View {
get: { amount.unit },
set: { newUnit in
guard newUnit != amount.unit else { return }
// No one litre figure equals a budget at every candidate price.
// A unit change starts a new, explicitly labelled comparison.
// No one litre figure equals a budget at every candidate price,
// so switching modes starts from that mode's configured default.
amount = FuelSavingsCalculator.newComparisonAmount(afterSwitching: amount, to: newUnit)
unitChangeNotice = "New comparison basis — adjust the \(newUnit.displayName) amount to your intended fill-up."
}
)
}