This commit is contained in:
Sem van der Hoeven
2021-01-06 10:36:37 +01:00
parent 587380fd89
commit 80764591ad

View File

@@ -263,6 +263,7 @@ public class HomeFragment extends Fragment implements LocationListener{
StaticData.INSTANCE.addDistance(distance);
currentLocation = location;
//new thread because we don't want the main thread to hang
Thread t = new Thread(() -> {
for (com.a1.nextlocation.data.Location l : LocationListManager.INSTANCE.getLocationList()) {
if (com.a1.nextlocation.data.Location.getDistance(currentLocation.getLatitude(),currentLocation.getLongitude(),l.getLat(),l.getLong()) < 10) {