Merge branch 'dev' into feature/sync

This commit is contained in:
2020-11-26 15:39:44 -06:00
110 changed files with 1949 additions and 535 deletions

View File

@@ -22,6 +22,8 @@ package org.isoron.uhabits;
import org.isoron.uhabits.core.models.*;
import org.isoron.uhabits.core.utils.DateUtils;
import static org.isoron.uhabits.core.models.Checkmark.*;
public class HabitFixtures
{
public boolean LONG_HABIT_CHECKS[] = {
@@ -73,7 +75,7 @@ public class HabitFixtures
81, 83, 89, 90, 91, 95, 102, 103, 108, 109, 120};
for (int mark : marks)
habit.getRepetitions().toggle(today.minus(mark));
habit.getRepetitions().setValue(today.minus(mark), YES_MANUAL);
return habit;
}
@@ -107,7 +109,7 @@ public class HabitFixtures
582, 583, 584, 586, 589};
for (int mark : marks)
habit.getRepetitions().toggle(today.minus(mark));
habit.getRepetitions().setValue(today.minus(mark), YES_MANUAL);
return habit;
}
@@ -126,8 +128,7 @@ public class HabitFixtures
Timestamp timestamp = DateUtils.getToday();
for (int value : LONG_NUMERICAL_HABIT_CHECKS)
{
Repetition r = new Repetition(timestamp, value);
habit.getRepetitions().add(r);
habit.getRepetitions().setValue(timestamp, value);
timestamp = timestamp.minus(1);
}
@@ -145,7 +146,7 @@ public class HabitFixtures
Timestamp timestamp = DateUtils.getToday();
for (boolean c : LONG_HABIT_CHECKS)
{
if (c) habit.getRepetitions().toggle(timestamp);
if (c) habit.getRepetitions().setValue(timestamp, YES_MANUAL);
timestamp = timestamp.minus(1);
}