Просмотр исходного кода

Revert "confirmation dialog instead of alert"

This reverts commit 12bcd1cb75a2dd1c7cfda07b1a4df9ee994efae5.
Robert 1 год назад
Родитель
Сommit
dbf1df37ae

+ 1 - 1
Trio/Sources/Localizations/Main/Localizable.xcstrings

@@ -156987,7 +156987,7 @@
         }
       }
     },
-    "This feature cannot be enabled unless Algorithm Settings > AutoSens > Autosens Max is set higher than 100%." : {
+    "This feature cannot be enabled unless Autosens Max > 100%." : {
 
     },
     "This feature ensures more accurate insulin adjustments when carb entries are missing or incorrect." : {

+ 4 - 6
Trio/Sources/Modules/TargetBehavoir/View/TargetBehavoirRootView.swift

@@ -187,17 +187,15 @@ extension TargetBehavoir {
             }
             .scrollContentBackground(.hidden).background(appState.trioBackgroundColor(for: colorScheme))
             .onAppear(perform: configureView)
-            .confirmationDialog(
+            .alert(
                 "Cannot Enable This Setting",
-                isPresented: $showAutosensMaxAlert,
-                titleVisibility: .visible
+                isPresented: $showAutosensMaxAlert
             ) {
-                // Actions that appear in the dialog
+                // Alert button(s). For a single button:
                 Button("Got it!", role: .cancel) {}
-                    .foregroundColor(Color.tabBar)
             } message: {
                 Text(
-                    "This feature cannot be enabled unless Algorithm Settings > AutoSens > Autosens Max is set higher than 100%."
+                    "This feature cannot be enabled unless Algorithm Settings > Autosens > Autosens Max is set higher than 100%."
                 )
             }
             .navigationTitle("Target Behavior")