瀏覽代碼

coding

Signed-off-by: marinofaggiana <ios@nextcloud.com>
marinofaggiana 2 年之前
父節點
當前提交
3d29e2a98f
共有 2 個文件被更改,包括 5 次插入2 次删除
  1. 4 1
      iOSClient/Files/NCFiles.swift
  2. 1 1
      iOSClient/Menu/NCCollectionViewCommon+Menu.swift

+ 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()
             }))
         }