Procházet zdrojové kódy

update 'Max Bolus exceeded' label

no longer shows when amount equals max, and adds unit after max bolus amount.
Mike Plante před 2 roky
rodič
revize
ddb4936363

+ 2 - 1
FreeAPS/Sources/Modules/Bolus/View/BolusRootView.swift

@@ -80,10 +80,11 @@ extension Bolus {
                         Button { state.add() }
                         label: {
                             Text(
-                                state.amount < state.maxBolus ? NSLocalizedString("Enact bolus", comment: "") :
+                                state.amount <= state.maxBolus ? NSLocalizedString("Enact bolus", comment: "") :
                                     NSLocalizedString("Max Bolus exceeded!", comment: "")
                                     + " (>"
                                     + formatter.string(from: state.maxBolus as NSNumber)!
+                                    + NSLocalizedString("U", comment: "Insulin unit")
                                     + ")"
                             ) }
                             .disabled(