From 8102c18c67bf17a7bbe9f4ebc2d2e22d6435a15a Mon Sep 17 00:00:00 2001 From: Alinson Xavier Date: Tue, 15 Mar 2016 19:55:50 -0400 Subject: [PATCH] Use long for millisecondsInOneDay Fixes #34 --- app/src/main/java/org/isoron/helpers/DateHelper.java | 2 +- app/src/main/java/org/isoron/uhabits/models/ScoreList.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/isoron/helpers/DateHelper.java b/app/src/main/java/org/isoron/helpers/DateHelper.java index 0aef8c0c6..173c5c627 100644 --- a/app/src/main/java/org/isoron/helpers/DateHelper.java +++ b/app/src/main/java/org/isoron/helpers/DateHelper.java @@ -31,7 +31,7 @@ import java.util.TimeZone; public class DateHelper { - public static int millisecondsInOneDay = 24 * 60 * 60 * 1000; + public static long millisecondsInOneDay = 24 * 60 * 60 * 1000; public static long getLocalTime() { diff --git a/app/src/main/java/org/isoron/uhabits/models/ScoreList.java b/app/src/main/java/org/isoron/uhabits/models/ScoreList.java index 18b67758d..c703e393a 100644 --- a/app/src/main/java/org/isoron/uhabits/models/ScoreList.java +++ b/app/src/main/java/org/isoron/uhabits/models/ScoreList.java @@ -124,7 +124,7 @@ public class ScoreList return lastScore; } - public int[] getAllValues(Long fromTimestamp, Long toTimestamp, Integer divisor) + public int[] getAllValues(Long fromTimestamp, Long toTimestamp, Long divisor) { // Force rebuild of the score table getNewestValue(); @@ -157,7 +157,7 @@ public class ScoreList } - public int[] getAllValues(int divisor) + public int[] getAllValues(long divisor) { Repetition oldestRep = habit.repetitions.getOldest(); if(oldestRep == null) return new int[0];