Merge tag 'v1.7.4' into dev

1.7.4

# Conflicts:
#	app/src/main/java/org/isoron/uhabits/models/sqlite/SQLiteCheckmarkList.java
#	app/src/main/java/org/isoron/uhabits/models/sqlite/SQLiteScoreList.java
#	uhabits-core/src/main/java/org/isoron/uhabits/core/models/ScoreList.java
This commit is contained in:
2017-06-05 09:20:47 -04:00
3 changed files with 4 additions and 6 deletions

View File

@@ -20,8 +20,8 @@
<manifest
package="org.isoron.uhabits"
xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="30"
android:versionName="1.7.3">
android:versionCode="31"
android:versionName="1.7.4">
<uses-permission android:name="android.permission.VIBRATE"/>

View File

@@ -267,9 +267,7 @@ public class SQLiteHabitList extends HabitList
for (HabitRecord record : recordList)
{
Habit habit = getById(record.getId());
if (habit == null)
throw new RuntimeException("habit not in database");
if (habit == null) continue;
if (!filter.matches(habit)) continue;
habits.add(habit);
}

View File

@@ -81,7 +81,7 @@ public abstract class ScoreList implements Iterable<Score>
* @param timestamp the timestamp of a day
* @return score value for that day
*/
public final double getValue(long timestamp)
public final synchronized double getValue(long timestamp)
{
compute(timestamp, timestamp);
Score s = getComputedByTimestamp(timestamp);