bastiaanv 2 месяцев назад
Родитель
Сommit
4158a2a5ff

+ 10 - 11
Trio/Sources/Localizations/Main/Localizable.xcstrings

@@ -19994,6 +19994,10 @@
       "comment" : "Display name for the \"0. 5U and over\" option in the bolus display threshold settings.",
       "isCommentAutoGenerated" : true
     },
+    "1 U and over" : {
+      "comment" : "Name for the \"1 U and over\" option in the bolus display threshold settings.",
+      "isCommentAutoGenerated" : true
+    },
     "1. Open the Settings app on your iOS device." : {
       "localizations" : {
         "bg" : {
@@ -20112,10 +20116,6 @@
         }
       }
     },
-    "1 U and over" : {
-      "comment" : "Name for the \"1 U and over\" option in the bolus display threshold settings.",
-      "isCommentAutoGenerated" : true
-    },
     "2 hours" : {
       "extractionState" : "manual",
       "localizations" : {
@@ -35722,6 +35722,9 @@
         }
       }
     },
+    "All Labels" : {
+
+    },
     "All Past Days of Data " : {
       "comment" : "Duration displayed in statPanel",
       "extractionState" : "manual",
@@ -66899,6 +66902,9 @@
         }
       }
     },
+    "Choose whether to display the amount above every bolus indicator or just for a bigger bolus amount" : {
+
+    },
     "Choose which format you'd prefer the eA1c (estimated A1c) and GMI (Glucose Management Index) value in the statistics view as a percentage (Example: eA1c: 6.5%) or mmol/mol (Example: eA1c: 48 mmol/mol)." : {
       "localizations" : {
         "bg" : {
@@ -208354,10 +208360,6 @@
         }
       }
     },
-    "Show All Labels" : {
-      "comment" : "Name to display for the option to show all insulin labels.",
-      "isCommentAutoGenerated" : true
-    },
     "Show carbs required as a red icon on the main graph icon." : {
       "localizations" : {
         "bg" : {
@@ -244328,9 +244330,6 @@
         }
       }
     },
-    "TODO: Helper text" : {
-
-    },
     "Tomorrow" : {
       "localizations" : {
         "bg" : {

+ 1 - 1
Trio/Sources/Models/BolusDisplayThreshold.swift

@@ -16,7 +16,7 @@ enum BolusDisplayThreshold: Decimal, CaseIterable, Encodable, Identifiable {
         case .pointOneUnit:
             return String(localized: "0.1 U and over")
         case .allUnits:
-            return String(localized: "Show All Labels")
+            return String(localized: "All Labels")
         }
     }
 }

+ 0 - 1
Trio/Sources/Modules/Home/HomeStateModel.swift

@@ -677,7 +677,6 @@ extension Home.StateModel:
         displayPumpStatusHighlightMessage()
         displayPumpStatusBadge()
         setupBatteryArray()
-        setupInsulinArray()
         Task {
             await setupCGMSettings()
         }

+ 1 - 1
Trio/Sources/Modules/Home/View/Chart/ChartElements/InsulinView.swift

@@ -33,7 +33,7 @@ struct InsulinView: ChartContent {
                     Image(systemName: "arrowtriangle.down.fill").font(.system(size: size)).foregroundStyle(Color.insulin)
                 }
                 .annotation(position: .top) {
-                    if bolusDisplayThreshold.rawValue >= amount as Decimal {
+                    if amount as Decimal >= bolusDisplayThreshold.rawValue {
                         Text(Formatter.bolusFormatter.string(from: amount) ?? "")
                             .font(.caption2)
                             .foregroundStyle(Color.primary)

+ 5 - 3
Trio/Sources/Modules/UserInterfaceSettings/View/UserInterfaceSettingsRootView.swift

@@ -212,11 +212,13 @@ extension UserInterfaceSettings {
                             Spacer()
                             Button(
                                 action: {
-                                    hintLabel = String(localized: "Glucose Color Scheme")
+                                    hintLabel = String(localized: "Bolus Display Threshold")
                                     selectedVerboseHint =
                                         AnyView(
-                                            VStack(alignment: .leading, spacing: 10) {
-                                                Text("TODO: Helper text")
+                                            VStack(alignment: .leading) {
+                                                Text(
+                                                    "Choose whether to display the amount above every bolus indicator or just for a bigger bolus amount"
+                                                )
                                             }
                                         )
                                     shouldDisplayHint.toggle()