mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-04-14 19:56:32 +00:00
Merge pull request #310 from HabitRPG/reward-creation
Validate reward creation
This commit is contained in:
commit
7747cc1cf0
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