Explorar el Código

fix bolus progress bar

polscm32 hace 2 años
padre
commit
2e68eab772
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      FreeAPS/Sources/Modules/Home/View/HomeRootView.swift

+ 1 - 1
FreeAPS/Sources/Modules/Home/View/HomeRootView.swift

@@ -677,7 +677,7 @@ extension Home {
         }
 
         @ViewBuilder func bolusView(_: GeometryProxy, _ progress: Decimal) -> some View {
-            let bolusTotal = state.boluses.last?.amount ?? 0
+            let bolusTotal = (recentPumpHistory.first?.bolus?.amount) as? Decimal ?? 0
             let bolusFraction = progress * bolusTotal
 
             let bolusString =