Parcourir la source

fix debouncer not updating bolus recommendation when deleting complete carb entry

polscm32 aka Marvout il y a 1 an
Parent
commit
c58c9824f5
1 fichiers modifiés avec 1 ajouts et 3 suppressions
  1. 1 3
      FreeAPS/Sources/Modules/Bolus/View/BolusRootView.swift

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

@@ -286,9 +286,7 @@ extension Bolus {
                     numberFormatter: mealFormatter
                     numberFormatter: mealFormatter
                 )
                 )
                 .onChange(of: state.carbs) { _ in
                 .onChange(of: state.carbs) { _ in
-                    if state.carbs > 0 {
-                        handleDebouncedInput()
-                    }
+                    handleDebouncedInput()
                 }
                 }
                 Text("g").foregroundColor(.secondary)
                 Text("g").foregroundColor(.secondary)
             }
             }