Unset measurable habits (#1899)

pull/1929/head
Leon Todd 2 years ago committed by GitHub
parent 248ba50a8e
commit a5e3e9b3cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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
}

Loading…
Cancel
Save