Jon Mårtensson пре 5 година
родитељ
комит
e5ee84458c
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      FreeAPS/Sources/Modules/Home/View/Header/CurrentGlucoseView.swift

+ 2 - 2
FreeAPS/Sources/Modules/Home/View/Header/CurrentGlucoseView.swift

@@ -33,8 +33,8 @@ struct CurrentGlucoseView: View {
     var colorOfGlucose: Color {
         let glucoseString =
             " \(recentGlucose?.glucose.map { glucoseFormatter.string(from: Double(units == .mmolL ? $0.asMmolL : Decimal($0)) as NSNumber)! })"
-        let glucoseStringWithoutSuffix = String(glucoseString.dropFirst(11)) // Drop first 11 characters
-        let glucoseStringTrimmed = String(glucoseStringWithoutSuffix.dropLast(3)) // Drop last 3 characters
+        let glucoseStringWithoutSuffix = String(glucoseString.dropFirst(11)) // Drop first 11 characters "Conditional"
+        let glucoseStringTrimmed = String(glucoseStringWithoutSuffix.dropLast(3)) // Drop last 3 characters "x")"
 
         switch glucoseStringTrimmed {
         case "4,",