Jelajahi Sumber

Merge pull request #465 from nightscout/beta-16-fixes

Misc. v0.3.0 (16) Fixes
Sam King 1 tahun lalu
induk
melakukan
dae0194c0b

+ 3 - 1
LiveActivity/Views/LiveActivityChartView.swift

@@ -144,7 +144,9 @@ struct LiveActivityChartView: View {
             let pointMark = PointMark(
                 x: .value("Time", chartDate),
                 y: .value("Value", displayValue)
-            ).symbolSize(16)
+            )
+            .symbolSize(16)
+            .shadow(color: Color.black.opacity(0.25), radius: 2, x: 0, y: 0)
 
             pointMark.foregroundStyle(pointMarkColor)
         }

+ 4 - 2
Trio/Sources/Modules/DataTable/View/DataTableRootView.swift

@@ -367,10 +367,12 @@ extension DataTable {
                                 action: {
                                     alertGlucoseToDelete = glucose
 
+                                    let glucoseToDisplay = state.units == .mgdL ? glucose.glucose
+                                        .description : Int(glucose.glucose).formattedAsMmolL
                                     alertTitle = String(localized: "Delete Glucose?", comment: "Alert title for deleting glucose")
                                     alertMessage = Formatter.dateFormatter
-                                        .string(from: glucose.date ?? Date()) + ", " +
-                                        (Formatter.decimalFormatterWithTwoFractionDigits.string(for: glucose.glucose) ?? "0")
+                                        .string(from: glucose.date ?? Date()) + ", " + glucoseToDisplay + " " + state.units
+                                        .rawValue
 
                                     isRemoveHistoryItemAlertPresented = true
                                 }

+ 3 - 3
Trio/Sources/Modules/Home/View/HomeRootView.swift

@@ -1056,13 +1056,13 @@ extension Home {
 
                 Button(
                     action: {
-                        state.showModal(for: .bolus) },
+                        state.showModal(for: .treatmentView) },
                     label: {
                         Image(systemName: "plus.circle.fill")
                             .font(.system(size: 40))
                             .foregroundStyle(Color.tabBar)
-                            .padding(.bottom, 1)
-                            .padding(.horizontal, 22.5)
+                            .padding(.vertical, 2)
+                            .padding(.horizontal, 24)
                     }
                 )
             }.ignoresSafeArea(.keyboard, edges: .bottom).blur(radius: state.waitForSuggestion ? 8 : 0)

+ 1 - 1
Trio/Sources/Modules/LiveActivitySettings/View/LiveActivityWidgetConfiguration.swift

@@ -377,7 +377,7 @@ enum LiveActivityItem: String, CaseIterable, Identifiable {
     var id: String { rawValue }
 
     static var defaultItems: [LiveActivityItem] {
-        [.currentGlucoseLarge, .iob, .cob, .updatedLabel]
+        [.currentGlucose, .iob, .cob, .updatedLabel]
     }
 
     var displayName: String {

+ 2 - 2
Trio/Sources/Router/Screen.swift

@@ -15,7 +15,7 @@ enum Screen: Identifiable, Hashable {
     case isfEditor
     case crEditor
     case targetsEditor
-    case bolus
+    case treatmentView
     case manualTempBasal
     case dataTable
     case cgm
@@ -82,7 +82,7 @@ extension Screen {
             CarbRatioEditor.RootView(resolver: resolver)
         case .targetsEditor:
             TargetsEditor.RootView(resolver: resolver)
-        case .bolus:
+        case .treatmentView:
             Treatments.RootView(resolver: resolver)
         case .manualTempBasal:
             ManualTempBasal.RootView(resolver: resolver)