浏览代码

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

cyberta 5 年之前
父节点
当前提交
d80c6e30a5
共有 1 个文件被更改,包括 1 次插入2 次删除
  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 {
-//        logger.debug("LOCATION: hasValidAccuracy: \(newLocation.horizontalAccuracy > 0)")
-        return newLocation.horizontalAccuracy > 0
+        return newLocation.horizontalAccuracy >= 0
     }
 
     func isSignificantlyMoreAccurate(newLocation: CLLocation, lastLocation: CLLocation) -> Bool {