This commit is contained in:
Bob Sun 2017-02-15 11:37:19 +08:00
parent a2fb5b4a2c
commit b2c5c2475b
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4

View file

@ -198,15 +198,17 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
var decryptedPassword: Password?
do {
decryptedPassword = try password.decrypt()!
DispatchQueue.main.async {
UIPasteboard.general.string = decryptedPassword?.password
SVProgressHUD.showSuccess(withStatus: "Password Copied")
SVProgressHUD.dismiss(withDelay: 0.6)
}
} catch {
print(error)
SVProgressHUD.showError(withStatus: error.localizedDescription)
SVProgressHUD.dismiss(withDelay: 1)
}
DispatchQueue.main.async {
UIPasteboard.general.string = decryptedPassword?.password
SVProgressHUD.showSuccess(withStatus: "Password Copied")
SVProgressHUD.dismiss(withDelay: 0.6)
DispatchQueue.main.async {
SVProgressHUD.showError(withStatus: error.localizedDescription)
SVProgressHUD.dismiss(withDelay: 1)
}
}
}
}