Marino Faggiana 7 years ago
parent
commit
3c2228190f
1 changed files with 3 additions and 0 deletions
  1. 3 0
      iOSClient/Security/NCEntoToEndInterface.swift

+ 3 - 0
iOSClient/Security/NCEntoToEndInterface.swift

@@ -161,6 +161,8 @@ class NCEntoToEndInterface : NSObject, OCNetworkingDelegate  {
         
         let ok = UIAlertAction(title: "OK", style: .default, handler: { (action) -> Void in
             
+            DispatchQueue.main.async(execute: {
+                
             let passphrase = passphraseTextField?.text
             
             guard let privateKey = (NCEndToEndEncryption.sharedManager().decryptPrivateKey(metadataNet.key, passphrase: passphrase)) else {
@@ -210,6 +212,7 @@ class NCEntoToEndInterface : NSObject, OCNetworkingDelegate  {
             self.getPublicKeyServer()
             
             NCManageDatabase.sharedInstance.addActivityClient("", fileID: "", action: k_activityDebugActionEndToEndEncryption, selector: actionGetEndToEndPrivateKeyCipher, note: "E2E PrivateKey present on Server and stored to keychain", type: k_activityTypeSuccess, verbose: false, activeUrl: "")
+            })
         })
         
         let cancel = UIAlertAction(title: "Cancel", style: .cancel) { (action) -> Void in