Преглед на файлове

fix timestamp comparison

cyberta преди 5 години
родител
ревизия
ce92a9ed93
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      deltachat-ios/Helper/LocationManager.swift

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

@@ -97,9 +97,9 @@ class LocationManager: NSObject, CLLocationManagerDelegate {
     /**
     /**
         Locations can be cached by iOS, timestamp comparison checks if the location has been tracked within the last 5 minutes
         Locations can be cached by iOS, timestamp comparison checks if the location has been tracked within the last 5 minutes
      */
      */
-    func isNewLocationOutdated(newLocation: CLLocation) -> Bool{
+    func isNewLocationOutdated(newLocation: CLLocation) -> Bool {
         let timeDelta = DateUtils.getRelativeTimeInSeconds(timeStamp: Double(newLocation.timestamp.timeIntervalSince1970))
         let timeDelta = DateUtils.getRelativeTimeInSeconds(timeStamp: Double(newLocation.timestamp.timeIntervalSince1970))
-        return timeDelta < Double(Time.fiveMinutes)
+        return timeDelta > Double(Time.fiveMinutes)
     }
     }
     
     
 }
 }