Skip to content

Commit 6fa92d3

Browse files
committed
Clear bolus recommendation on initial edit
1 parent b9ac026 commit 6fa92d3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Loop/Views/BolusEntryView.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,11 @@ struct BolusEntryView: View {
248248
.multilineTextAlignment(.trailing)
249249
.foregroundColor(.loopAccent)
250250
.focused($bolusFieldFocused)
251-
.onTapGesture { didBeginEditing() }
251+
.onChange(of: bolusFieldFocused) { focused in
252+
if focused {
253+
didBeginEditing()
254+
}
255+
}
252256
.onChange(of: enteredBolusString) { newValue in
253257
if newValue.count > 5 {
254258
enteredBolusString = String(newValue.prefix(5))

0 commit comments

Comments
 (0)