Skip to content

Commit

Permalink
Display "" instead of 0.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon-b-m committed May 9, 2023
1 parent 3e1dfff commit 154d5f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion FreeAPS/Sources/Views/DecimalTextField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ struct DecimalTextField: UIViewRepresentable {
let coordinator = context.coordinator
if coordinator.isEditing {
coordinator.resetEditing()
} else /* if value != 0 */ {
} else if value == 0 {
textField.text = ""
} else {
textField.text = formatter.string(for: value)
}
}
Expand Down

0 comments on commit 154d5f7

Please sign in to comment.