mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-25 15:16:01 +00:00
Validate reward creation
This commit is contained in:
parent
4738245d4c
commit
6adaae12b6
1 changed files with 7 additions and 1 deletions
|
|
@ -438,7 +438,13 @@ public class TaskFormActivity extends AppCompatActivity implements AdapterView.O
|
|||
break;
|
||||
|
||||
case "reward": {
|
||||
task.setValue(Double.parseDouble(taskValue.getText().toString()));
|
||||
String value = taskValue.getText().toString();
|
||||
if(!value.isEmpty()){
|
||||
task.setValue(Double.parseDouble(value));
|
||||
}else{
|
||||
task.setValue(0.0d);
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue