Browse Source

update API

marinofaggiana 4 years ago
parent
commit
2fc0156944
3 changed files with 5 additions and 6 deletions
  1. 1 1
      Cartfile
  2. 1 1
      Cartfile.resolved
  3. 3 4
      File Provider Extension/FileProviderEnumerator.swift

+ 1 - 1
Cartfile

@@ -1,4 +1,4 @@
-github "nextcloud/ios-communication-library" "v0.74"
+github "nextcloud/ios-communication-library" "develop"
 github "tilltue/TLPhotoPicker" "2.0.11"
 github "kishikawakatsumi/UICKeyChainStore" "v2.1.2"
 github "MortimerGoro/MGSwipeTableCell" "1.6.8"

+ 1 - 1
Cartfile.resolved

@@ -19,7 +19,7 @@ github "malcommac/SwiftRichString" "3.7.2"
 github "marinofaggiana/KTVHTTPCache" "2.0.2"
 github "marinofaggiana/TOPasscodeViewController" "0.0.7"
 github "marinofaggiana/XLForm" "eb9381ad8129f60402bf412250fb31b95a628a08"
-github "nextcloud/ios-communication-library" "v0.74"
+github "nextcloud/ios-communication-library" "d1ffa16c6e6294713e1ad6eecb01a2eeee30db7b"
 github "realm/realm-cocoa" "v5.2.0"
 github "rechsteiner/Parchment" "v1.7.0"
 github "scenee/FloatingPanel" "v1.7.5"

+ 3 - 4
File Provider Extension/FileProviderEnumerator.swift

@@ -282,10 +282,9 @@ class FileProviderEnumerator: NSObject, NSFileProviderEnumerator {
         }
         
         NCCommunication.shared.iosHelper(fileNamePath: fileNamePath, serverUrl: serverUrl, offset: offset, limit: limit) { (account, files, errorCode, errorDescription) in
-            
-             if errorCode == 0 && files != nil  && files!.count >= 1 {
-                                
-                NCManageDatabase.sharedInstance.convertNCCommunicationFilesToMetadatas(files!, useMetadataFolder: false, account: account) { (metadataFolder, metadatasFolder, metadatas) in
+             
+            if errorCode == 0 {
+                NCManageDatabase.sharedInstance.convertNCCommunicationFilesToMetadatas(files, useMetadataFolder: false, account: account) { (metadataFolder, metadatasFolder, metadatas) in
                     NCManageDatabase.sharedInstance.updateMetadatasServerUrl(serverUrl, account: account, metadatas: metadatas)
                     for metadata in metadatasFolder {
                         let serverUrl = metadata.serverUrl + "/" + metadata.fileNameView