mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
Change the way score are grouped
This commit is contained in:
@@ -124,7 +124,7 @@ public class ScoreListTest
|
||||
{
|
||||
toggleRepetitions(0, 20);
|
||||
|
||||
int expectedValues[] = { 12629351, 11006461, 7272612, 2800230 };
|
||||
int expectedValues[] = { 11434978, 7894999, 3212362 };
|
||||
|
||||
int actualValues[] = habit.scores.getAllValues(7);
|
||||
assertThat(actualValues, equalTo(expectedValues));
|
||||
|
||||
@@ -218,7 +218,7 @@ public class ScoreList
|
||||
compute(from, to);
|
||||
|
||||
divisor *= DateHelper.millisecondsInOneDay;
|
||||
Long offset = to + divisor - 1;
|
||||
Long offset = to + divisor;
|
||||
|
||||
String query = "select ((timestamp - ?) / ?) as time, avg(score) from Score " +
|
||||
"where habit = ? and timestamp >= ? and timestamp <= ? " +
|
||||
|
||||
Reference in New Issue
Block a user