Эх сурвалжийг харах

NCNetworkingProcessUpload only if noreground

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 жил өмнө
parent
commit
a180dab502

+ 3 - 1
iOSClient/AppDelegate.swift

@@ -152,7 +152,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
         NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterInitialize, userInfo:["atStart":1])
 
         // Process upload
-        networkingProcessUpload = NCNetworkingProcessUpload()
+        if UIApplication.shared.applicationState != .background {
+            networkingProcessUpload = NCNetworkingProcessUpload()
+        }
 
         // Push Notification & display notification
         application.registerForRemoteNotifications()