Fix crash when saving habit (some languages only)

This commit is contained in:
2020-06-21 11:31:53 -05:00
parent b78cd1dd0d
commit bf650a7565
3 changed files with 9 additions and 1 deletions

View File

@@ -3,6 +3,7 @@
### 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.
* Fix crash when saving habit
### 1.8.0 (Jan 1, 2020)

View File

@@ -57,7 +57,13 @@ public class TargetPanel extends FrameLayout
public double getTargetValue()
{
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)

View File

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