Browse Source

service

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 1 year ago
parent
commit
92475f2910
1 changed files with 2 additions and 1 deletions
  1. 2 1
      iOSClient/Networking/NCService.swift

+ 2 - 1
iOSClient/Networking/NCService.swift

@@ -94,7 +94,6 @@ class NCService: NSObject {
         let options = NKRequestOptions(queue: NextcloudKit.shared.nkCommonInstance.backgroundQueue)
 
         let resultServerStatus = await NextcloudKit.shared.getServerStatus(serverUrl: appDelegate.urlBase, options: options)
-        let resultUserProfile = await NextcloudKit.shared.getUserProfile(options: options)
 
         if resultServerStatus.maintenance {
             let error = NKError(errorCode: NCGlobal.shared.errorInternalError, errorDescription: "_maintenance_mode_")
@@ -112,6 +111,8 @@ class NCService: NSObject {
             NCContentPresenter.shared.showWarning(error: error, priority: .max)
         }
 
+        let resultUserProfile = await NextcloudKit.shared.getUserProfile(options: options)
+
         if resultUserProfile.error == .success, let userProfile = resultUserProfile.userProfile {
             guard let tableAccount = NCManageDatabase.shared.setAccountUserProfile(account: resultUserProfile.account, userProfile: userProfile) else {
                 let error = NKError(errorCode: NCGlobal.shared.errorInternalError, errorDescription: "Internal error: account not found on DB")