Fix crash when saving habit (some languages only)

pull/605/head
Alinson S. Xavier 5 years ago
parent b78cd1dd0d
commit bf650a7565

@ -3,6 +3,7 @@
### 1.8.8 (June 21, 2020) ### 1.8.8 (June 21, 2020)
* Make small changes to the habit scheduling algorithm, so that "1 time every x days" habits work more predictably. * Make small changes to the habit scheduling algorithm, so that "1 time every x days" habits work more predictably.
* Fix crash when saving habit
### 1.8.0 (Jan 1, 2020) ### 1.8.0 (Jan 1, 2020)

@ -57,7 +57,13 @@ public class TargetPanel extends FrameLayout
public double getTargetValue() public double getTargetValue()
{ {
String sValue = tvTargetValue.getText().toString(); String sValue = tvTargetValue.getText().toString();
return Double.parseDouble(sValue); double value = 0;
try {
value = Double.parseDouble(sValue);
} catch (NumberFormatException e) {
// NOP
}
return value;
} }
public void setTargetValue(double targetValue) public void setTargetValue(double targetValue)

@ -1,5 +1,6 @@
1.8.8 1.8.8
* Small tweaks to the habit scheduling algorithm * Small tweaks to the habit scheduling algorithm
* Fix some crashes
1.8: 1.8:
* New bar chart showing number of repetitions performed each week, month or year * New bar chart showing number of repetitions performed each week, month or year
* Performing habits on irregular weekdays will no longer break your streak * Performing habits on irregular weekdays will no longer break your streak

Loading…
Cancel
Save