diff --git a/FreeAPS/Sources/Modules/AddCarbs/View/AddCarbsRootView.swift b/FreeAPS/Sources/Modules/AddCarbs/View/AddCarbsRootView.swift index 60cfadf2c5..d3ebed4bfc 100644 --- a/FreeAPS/Sources/Modules/AddCarbs/View/AddCarbsRootView.swift +++ b/FreeAPS/Sources/Modules/AddCarbs/View/AddCarbsRootView.swift @@ -12,6 +12,7 @@ extension AddCarbs { @State var isPromptPresented = false @State var saved = false @State var pushed = false + @State var button = false @State private var showAlert = false @FocusState private var isFocused: Bool @@ -113,7 +114,10 @@ extension AddCarbs { } Section { - Button { state.add(override, fetch: editMode) } + Button { + button.toggle() + if button { state.add(override, fetch: editMode) } + } label: { Text(((state.skipBolus && !override && !editMode) || state.carbs <= 0) ? "Save" : "Continue") } .disabled(empty) .frame(maxWidth: .infinity, alignment: .center)