瀏覽代碼

coding

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

+ 3 - 5
iOSClient/Files/NCFiles.swift

@@ -110,8 +110,7 @@ class NCFiles: NCCollectionViewCommon {
 
     override func reloadDataSourceNetwork(forced: Bool = false) {
         super.reloadDataSourceNetwork(forced: forced)
-
-        if isSearching {
+        guard !isSearching else {
             networkSearch()
             return
         }
@@ -133,12 +132,11 @@ class NCFiles: NCCollectionViewCommon {
             DispatchQueue.main.async {
                 self.isReloadDataSourceNetworkInProgress = false
                 self.richWorkspaceText = tableDirectory?.richWorkspace
+                self.refreshControl.endRefreshing()
+                self.collectionView?.reloadData()
                 if metadatasUpdate?.count ?? 0 > 0 || metadatasDelete?.count ?? 0 > 0 || forced {
                     self.reloadDataSource(forced: false)
-                } else {
-                    self.collectionView?.reloadData()
                 }
-                self.refreshControl.endRefreshing()
             }
         }
     }