瀏覽代碼

fix

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 年之前
父節點
當前提交
3578535fa9
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      iOSClient/AppDelegate.swift

+ 4 - 1
iOSClient/AppDelegate.swift

@@ -151,7 +151,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
         NotificationCenter.default.addObserver(self, selector: #selector(initialize), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterInitialize), object: nil)
 
         // NOT in Background : Start process Upload, Initialize
-        if UIApplication.shared.applicationState != .background {
+        if UIApplication.shared.applicationState == .background {
+            NKCommon.shared.writeLog("Process in background, denied process upload and Inizialize main")
+        } else {
+            NKCommon.shared.writeLog("Starting process upload and Inizialize main")
             networkingProcessUpload = NCNetworkingProcessUpload()
             NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterInitialize, userInfo:["atStart":1])
         }