Browse Source

coding

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 years ago
parent
commit
4716a8e346
2 changed files with 4 additions and 1 deletions
  1. 3 0
      iOSClient/AppDelegate.swift
  2. 1 1
      iOSClient/Networking/E2EE/NCNetworkingE2EE.swift

+ 3 - 0
iOSClient/AppDelegate.swift

@@ -312,6 +312,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
         // Registeration push notification
         NCPushNotification.shared().pushNotification()
 
+        // Unlock E2EE
+        NCNetworkingE2EE.shared.unlockAll(account: account)
+        
         // Start services
         NCService.shared.startRequestServicesServer()
 

+ 1 - 1
iOSClient/Networking/E2EE/NCNetworkingE2EE.swift

@@ -78,7 +78,7 @@ class NCNetworkingE2EE: NSObject {
         Task {
             for result in NCManageDatabase.shared.getE2EAllTokenLock(account: account) {
                 let lockE2EEFolderResults = await NextcloudKit.shared.lockE2EEFolder(fileId: result.fileId, e2eToken: result.e2eToken, method: "DELETE")
-                if lockE2EEFolderResults.error == .success {
+                if lockE2EEFolderResults.error == .success || lockE2EEFolderResults.error.errorCode == 500 {
                     NCManageDatabase.shared.deteleE2ETokenLock(account: account, serverUrl: result.serverUrl)
                 }
             }