diff options
author | Marino Faggiana <marino@marinofaggiana.com> | 2022-09-30 15:46:36 +0300 |
---|---|---|
committer | Marino Faggiana <marino@marinofaggiana.com> | 2022-09-30 15:46:36 +0300 |
commit | a180dab502530f66efaa82db9c6ce43d631d41fc (patch) | |
tree | dc35ebf322c9d75db6d7fab0f8d0195fa0a32554 | |
parent | 9e47fcc154463896cacb0122ee4f8ab7a8c22359 (diff) |
NCNetworkingProcessUpload only if noreground
Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
-rw-r--r-- | iOSClient/AppDelegate.swift | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/iOSClient/AppDelegate.swift b/iOSClient/AppDelegate.swift index bed64b30a..f3c3aaf24 100644 --- a/iOSClient/AppDelegate.swift +++ b/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() |