فهرست منبع

Only display "Continue without bolus" when insulin amount <= 0

Jon Mårtensson 2 سال پیش
والد
کامیت
d424817348

+ 7 - 5
FreeAPS/Sources/Modules/Bolus/View/AlternativeBolusCalcRootView.swift

@@ -159,12 +159,14 @@ extension Bolus {
                             )
                             )
                     }
                     }
                 }
                 }
-                Section {
-                    Button {
-                        keepForNextWiew = true
-                        state.showModal(for: nil)
+                if state.amount <= 0 {
+                    Section {
+                        Button {
+                            keepForNextWiew = true
+                            state.showModal(for: nil)
+                        }
+                        label: { Text("Continue without bolus") }.frame(maxWidth: .infinity, alignment: .center)
                     }
                     }
-                    label: { Text("Continue without bolus") }.frame(maxWidth: .infinity, alignment: .center)
                 }
                 }
             }
             }
             .blur(radius: showInfo ? 3 : 0)
             .blur(radius: showInfo ? 3 : 0)

+ 1 - 1
FreeAPS/Sources/Modules/Bolus/View/DefaultBolusCalcRootView.swift

@@ -146,7 +146,7 @@ extension Bolus {
                                 )
                                 )
                         }
                         }
                     }
                     }
-                    if waitForSuggestion {
+                    if state.amount <= 0 {
                         Section {
                         Section {
                             Button {
                             Button {
                                 keepForNextWiew = true
                                 keepForNextWiew = true