فهرست منبع

coding

Signed-off-by: marinofaggiana <ios@nextcloud.com>
marinofaggiana 2 سال پیش
والد
کامیت
997d403f96
2فایلهای تغییر یافته به همراه3 افزوده شده و 6 حذف شده
  1. 1 2
      iOSClient/AppDelegate.swift
  2. 2 4
      iOSClient/Files/NCFiles.swift

+ 1 - 2
iOSClient/AppDelegate.swift

@@ -298,8 +298,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
     // MARK: -
 
     @objc private func initialize() {
-
-        if account == "" { return }
+        guard !account.isEmpty else { return }
 
         NCCommunicationCommon.shared.writeLog("initialize Main")
 

+ 2 - 4
iOSClient/Files/NCFiles.swift

@@ -121,10 +121,8 @@ class NCFiles: NCCollectionViewCommon {
         networkReadFolder(forced: forced) { tableDirectory, metadatas, metadatasUpdate, metadatasDelete, errorCode, _ in
             if errorCode == 0 {
                 for metadata in metadatas ?? [] {
-                    if !metadata.directory {
-                        if NCManageDatabase.shared.isDownloadMetadata(metadata, download: false) {
-                            NCOperationQueue.shared.download(metadata: metadata, selector: NCGlobal.shared.selectorDownloadFile)
-                        }
+                    if !metadata.directory, NCManageDatabase.shared.isDownloadMetadata(metadata, download: false) {
+                        NCOperationQueue.shared.download(metadata: metadata, selector: NCGlobal.shared.selectorDownloadFile)
                     }
                 }
             }