marinofaggiana 4 년 전
부모
커밋
0b5bd52cc7
1개의 변경된 파일4개의 추가작업 그리고 6개의 파일을 삭제
  1. 4 6
      iOSClient/Networking/NCAutoUpload.swift

+ 4 - 6
iOSClient/Networking/NCAutoUpload.swift

@@ -76,12 +76,10 @@ class NCAutoUpload: NSObject, CLLocationManagerDelegate {
     }
     
     func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) {
-        NCAskAuthorization.shared.askAuthorizationLocationManager() { (hasFullPermissions) in
-            if !hasFullPermissions {
-                NCManageDatabase.shared.setAccountAutoUploadProperty("autoUploadBackground", state: false)
-                self.stopSignificantChangeUpdates()
-            }
-        }
+        if CLLocationManager.authorizationStatus() != CLAuthorizationStatus.authorizedAlways {
+            NCManageDatabase.shared.setAccountAutoUploadProperty("autoUploadBackground", state: false)
+            self.stopSignificantChangeUpdates()
+        } 
     }
     
     func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) {