Kaynağa Gözat

Remoye duplicate code after bad merge.
Remove superfluent info.

(cherry picked from commit 8dd4601c503ea309c3ba1b47317f458e80f9bd2b)

Jon Mårtensson 2 yıl önce
ebeveyn
işleme
b2111c41d5

+ 2 - 23
FreeAPS/Sources/Modules/Bolus/View/BolusRootView.swift

@@ -114,10 +114,7 @@ extension Bolus {
             .alert(isPresented: $displayError) {
                 Alert(
                     title: Text("Warning!"),
-                    message: Text("\n" + alertString() + NSLocalizedString(
-                        "\n\nTap 'Add' to continue with selected amount.",
-                        comment: "Alert text to confirm bolus amount to add"
-                    )),
+                    message: Text("\n" + alertString() + "\n"),
                     primaryButton: .destructive(
                         Text("Add"),
                         action: {
@@ -127,25 +124,7 @@ extension Bolus {
                     ),
                     secondaryButton: .cancel()
                 )
-            }
-            .alert(isPresented: $displayError) {
-                Alert(
-                    title: Text("Warning!"),
-                    message: Text("\n" + alertString() + NSLocalizedString(
-                        "\n\nTap 'Add' to continue with selected amount.",
-                        comment: "Alert text to confirm bolus amount to add"
-                    )),
-                    primaryButton: .destructive(
-                        Text("Add"),
-                        action: {
-                            state.amount = state.insulinRecommended
-                            displayError = false
-                        }
-                    ),
-                    secondaryButton: .cancel()
-                )
-            }
-            .onAppear {
+            }.onAppear {
                 configureView {
                     state.waitForSuggestionInitial = waitForSuggestion
                     state.waitForSuggestion = waitForSuggestion