Эх сурвалжийг харах

coding

Signed-off-by: marinofaggiana <ios@nextcloud.com>
marinofaggiana 2 жил өмнө
parent
commit
3d29e2a98f

+ 4 - 1
iOSClient/Files/NCFiles.swift

@@ -69,7 +69,9 @@ class NCFiles: NCCollectionViewCommon {
     }
 
     // MARK: - DataSource + NC Endpoint
-
+    //
+    // forced: do no make the etag of directory test (default)
+    //
     override func reloadDataSource(forced: Bool = true) {
         super.reloadDataSource()
 
@@ -81,6 +83,7 @@ class NCFiles: NCCollectionViewCommon {
         }
         let directory = NCManageDatabase.shared.getTableDirectory(predicate: NSPredicate(format: "account == %@ AND serverUrl == %@", appDelegate.account, self.serverUrl))
 
+        // FORCED false: yes, test the directory.etag
         if !forced, let directory = directory, directory.etag == self.dataSource.directory?.etag {
             return
         }

+ 1 - 1
iOSClient/Menu/NCCollectionViewCommon+Menu.swift

@@ -159,7 +159,7 @@ extension NCCollectionViewCommon {
         //
         if !isFolderEncrypted {
             actions.append(.setAvailableOfflineAction(selectedMetadatas: [metadata], isAnyOffline: isOffline, viewController: self, completion: {
-                self.reloadDataSource(forced: true)
+                self.reloadDataSource()
             }))
         }