فهرست منبع

Fix basal rendering

Ivan Valkou 5 سال پیش
والد
کامیت
a5c5f604af

+ 7 - 0
FreeAPS.xcodeproj/xcshareddata/xcschemes/FreeAPS X.xcscheme

@@ -298,6 +298,13 @@
             ReferencedContainer = "container:FreeAPS.xcodeproj">
          </BuildableReference>
       </BuildableProductRunnable>
+      <EnvironmentVariables>
+         <EnvironmentVariable
+            key = "CG_NUMERICS_SHOW_BACKTRACE"
+            value = ""
+            isEnabled = "YES">
+         </EnvironmentVariable>
+      </EnvironmentVariables>
    </LaunchAction>
    <ProfileAction
       buildConfiguration = "Release"

+ 3 - 0
FreeAPS/Sources/Modules/Home/View/Chart/MainChartView.swift

@@ -573,6 +573,9 @@ extension MainChartView {
             return cached
         }
         cachedMaxBasalRate = tempBasals.compactMap(\.rate).max() ?? maxBasal
+        if cachedMaxBasalRate == 0 {
+            cachedMaxBasalRate = maxBasal
+        }
         return cachedMaxBasalRate!
     }