From 04e137fe86fc1e540fb53ae7ba458429f8ad3091 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Thu, 14 Jun 2018 15:25:55 +0100 Subject: [PATCH] Limiting Map to last 24hrs, making that explicit --- .../main/java/uk/ac/masts/sifids/activities/MapActivity.java | 5 +---- catch/src/main/res/values/strings.xml | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/catch/src/main/java/uk/ac/masts/sifids/activities/MapActivity.java b/catch/src/main/java/uk/ac/masts/sifids/activities/MapActivity.java index dbad449..1c7b41f 100644 --- a/catch/src/main/java/uk/ac/masts/sifids/activities/MapActivity.java +++ b/catch/src/main/java/uk/ac/masts/sifids/activities/MapActivity.java @@ -107,10 +107,7 @@ private void getPoints() { @Override public void run() { Calendar cal = Calendar.getInstance(); - cal.add(Calendar.DATE, -1 * (cal.get(Calendar.DAY_OF_WEEK) - 1)); - cal.set(Calendar.HOUR_OF_DAY, 0); - cal.set(Calendar.MINUTE, 0); - cal.set(Calendar.SECOND, 0); + cal.add(Calendar.DATE, -1); points = db.catchDao().getLocationsSince(cal.getTime()); } }; diff --git a/catch/src/main/res/values/strings.xml b/catch/src/main/res/values/strings.xml index aa085b7..3d55929 100644 --- a/catch/src/main/res/values/strings.xml +++ b/catch/src/main/res/values/strings.xml @@ -134,7 +134,7 @@ - Map + Map (last 24hrs)