Kaynağa Gözat

Some comments

Jon Mårtensson 5 yıl önce
ebeveyn
işleme
e5ee84458c

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

@@ -33,8 +33,8 @@ struct CurrentGlucoseView: View {
     var colorOfGlucose: Color {
     var colorOfGlucose: Color {
         let glucoseString =
         let glucoseString =
             " \(recentGlucose?.glucose.map { glucoseFormatter.string(from: Double(units == .mmolL ? $0.asMmolL : Decimal($0)) as NSNumber)! })"
             " \(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 {
         switch glucoseStringTrimmed {
         case "4,",
         case "4,",