mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 01:08:50 -06:00
Unset measurable habits (#1899)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user