Skip to content

Commit

Permalink
Unset measurable habits (#1899)
Browse files Browse the repository at this point in the history
  • Loading branch information
leontodd authored Jan 31, 2024
1 parent 248ba50 commit a5e3e9b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ class NumberDialog : AppCompatDialogFragment() {
try {
val numberFormat = NumberFormat.getInstance()
val valueStr = view.value.text.toString()
value = numberFormat.parse(valueStr)!!.toDouble()
value = if (valueStr.isNotEmpty()) {
numberFormat.parse(valueStr)!!.toDouble()
} else {
Entry.UNKNOWN.toDouble() / 1000
}
} catch (e: ParseException) {
// NOP
}
Expand Down

0 comments on commit a5e3e9b

Please sign in to comment.