add extra distance check

This commit is contained in:
Sem van der Hoeven
2021-01-12 15:30:30 +01:00
parent 57edff604e
commit 638198450e

View File

@@ -363,7 +363,7 @@ public class HomeFragment extends Fragment implements LocationListener {
if (currentLocation != null) {
double distance = currentLocation.distanceTo(location); // in meters
// can't walk 100 meters in a few seconds
if (distance < 100) {
if (distance < 100 && distance > 0.1) {
Data.INSTANCE.addDistance(distance);
Data.INSTANCE.setLocation(location);
}