Przeglądaj źródła

a location's accuracy is allowed to be 0, only negative values are invalid

cyberta 5 lat temu
rodzic
commit
d80c6e30a5
1 zmienionych plików z 1 dodań i 2 usunięć
  1. 1 2
      deltachat-ios/Helper/LocationManager.swift

+ 1 - 2
deltachat-ios/Helper/LocationManager.swift

@@ -112,8 +112,7 @@ class LocationManager: NSObject, CLLocationManagerDelegate {
     }
     }
 
 
     func hasValidAccuracy(newLocation: CLLocation) -> Bool {
     func hasValidAccuracy(newLocation: CLLocation) -> Bool {
-//        logger.debug("LOCATION: hasValidAccuracy: \(newLocation.horizontalAccuracy > 0)")
-        return newLocation.horizontalAccuracy > 0
+        return newLocation.horizontalAccuracy >= 0
     }
     }
 
 
     func isSignificantlyMoreAccurate(newLocation: CLLocation, lastLocation: CLLocation) -> Bool {
     func isSignificantlyMoreAccurate(newLocation: CLLocation, lastLocation: CLLocation) -> Bool {