Przeglądaj źródła

Fix range warning

Ivan Valkou 4 lat temu
rodzic
commit
88061dbb02

+ 2 - 2
FreeAPS.xcworkspace/xcshareddata/swiftpm/Package.resolved

@@ -24,8 +24,8 @@
         "repositoryURL": "https://github.com/ivalkou/LibreTransmitterX",
         "state": {
           "branch": null,
-          "revision": "966c96777d801b4cd4b59bf293ed3c70160f006e",
-          "version": "1.0.6"
+          "revision": "2f8df15df7314a940259c93aed38d8ce928c674e",
+          "version": "1.0.7"
         }
       },
       {

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

@@ -147,7 +147,7 @@ struct MainChartView: View {
     }
 
     private func glucoseLabelsView(fullSize: CGSize) -> some View {
-        ForEach(0 ..< Config.yLinesCount + 1) { line -> AnyView in
+        ForEach(0 ..< Config.yLinesCount + 1, id: \.self) { line -> AnyView in
             let range = glucoseYGange
             let yStep = (range.maxY - range.minY) / CGFloat(Config.yLinesCount)
             let valueStep = Double(range.maxValue - range.minValue) / Double(Config.yLinesCount)