Browse Source

coding

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 years ago
parent
commit
a610bdb06b
1 changed files with 4 additions and 2 deletions
  1. 4 2
      iOSClient/AppDelegate.swift

+ 4 - 2
iOSClient/AppDelegate.swift

@@ -227,6 +227,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
     func applicationWillEnterForeground(_ application: UIApplication) {
         guard !account.isEmpty, let activeAccount = NCManageDatabase.shared.getActiveAccount() else { return }
 
+        NKCommon.shared.writeLog("[INFO] Application will enter in foreground")
+
         // Account changed ??
         if activeAccount.account != account {
             settingAccount(activeAccount.account, urlBase: activeAccount.urlBase, user: activeAccount.user, userId: activeAccount.userId, password: CCUtility.getPassword(activeAccount.account))
@@ -234,8 +236,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
             NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterInitialize)
         }
 
-        NKCommon.shared.writeLog("[INFO] Application will enter in foreground")
-
         // START TIMER UPLOAD PROCESS
         networkingProcessUpload?.startTimer()
 
@@ -262,6 +262,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
     func applicationWillResignActive(_ application: UIApplication) {
         guard !account.isEmpty else { return }
 
+        NKCommon.shared.writeLog("[INFO] Application will resign active")
+
         if CCUtility.getPrivacyScreenEnabled() {
             // Privacy
             showPrivacyProtectionWindow()