Просмотр исходного кода

Fix temp targets layout and pump view

Ivan Valkou 5 лет назад
Родитель
Сommit
d229b43e72

+ 1 - 1
FreeAPS/Resources/Info.plist

@@ -17,7 +17,7 @@
 	<key>CFBundleShortVersionString</key>
 	<string>$(MARKETING_VERSION)</string>
 	<key>CFBundleVersion</key>
-	<string>238</string>
+	<string>239</string>
 	<key>LSApplicationQueriesSchemes</key>
 	<array>
 		<string>dexcomg6</string>

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

@@ -333,6 +333,7 @@ struct MainChartView: View {
             calculateGlucoseDots(fullSize: fullSize)
             calculateBolusDots(fullSize: fullSize)
             calculateCarbsDots(fullSize: fullSize)
+            calculateTempTargetsRects(fullSize: fullSize)
         }
         .onChange(of: didAppearTrigger) { _ in
             calculatePredictionDots(fullSize: fullSize, type: .iob)
@@ -342,6 +343,7 @@ struct MainChartView: View {
             calculateGlucoseDots(fullSize: fullSize)
             calculateBolusDots(fullSize: fullSize)
             calculateCarbsDots(fullSize: fullSize)
+            calculateTempTargetsRects(fullSize: fullSize)
         }
     }
 }

+ 4 - 0
FreeAPS/Sources/Modules/Home/View/Header/PumpView.swift

@@ -57,6 +57,10 @@ struct PumpView: View {
     }
 
     private func remainingTimeString(time: TimeInterval) -> String {
+        guard time > 0 else {
+            return "Replace pod"
+        }
+
         var time = time
         let days = Int(time / 1.days.timeInterval)
         time -= days.days.timeInterval