Browse Source

coding

Signed-off-by: marinofaggiana <ios@nextcloud.com>
marinofaggiana 2 years ago
parent
commit
1577de0614
1 changed files with 3 additions and 5 deletions
  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()
             }
         }
     }