Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/ios.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'iOSClient/Favorites/NCFavorite.swift')
-rw-r--r--iOSClient/Favorites/NCFavorite.swift10
1 files changed, 3 insertions, 7 deletions
diff --git a/iOSClient/Favorites/NCFavorite.swift b/iOSClient/Favorites/NCFavorite.swift
index d6f2d3894..682d3d850 100644
--- a/iOSClient/Favorites/NCFavorite.swift
+++ b/iOSClient/Favorites/NCFavorite.swift
@@ -103,13 +103,9 @@ class NCFavorite: NCCollectionViewCommon {
} else {
networkReadFolder(forced: forced) { tableDirectory, metadatas, metadatasUpdate, metadatasDelete, error in
- if error == .success {
- for metadata in metadatas ?? [] {
- if !metadata.directory {
- if NCManageDatabase.shared.isDownloadMetadata(metadata, download: false) {
- NCOperationQueue.shared.download(metadata: metadata, selector: NCGlobal.shared.selectorDownloadFile)
- }
- }
+ if error == .success, let metadatas = metadatas {
+ for metadata in metadatas where (!metadata.directory && NCManageDatabase.shared.isDownloadMetadata(metadata, download: false)) {
+ NCOperationQueue.shared.download(metadata: metadata, selector: NCGlobal.shared.selectorDownloadFile)
}
}