Unset measurable habits (#1899)

This commit is contained in:
Leon Todd
2024-01-31 01:42:53 +00:00
committed by GitHub
parent 248ba50a8e
commit a5e3e9b3cf

View File

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