improve UI
This commit is contained in:
parent
76b863f00a
commit
af68f15947
1 changed files with 18 additions and 11 deletions
|
|
@ -147,17 +147,24 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
|
||||||
} else {
|
} else {
|
||||||
password = passwordEntities![index]
|
password = passwordEntities![index]
|
||||||
}
|
}
|
||||||
do {
|
UIImpactFeedbackGenerator(style: .medium).impactOccurred()
|
||||||
let generator = UIImpactFeedbackGenerator(style: .medium)
|
SVProgressHUD.setDefaultMaskType(.clear)
|
||||||
let decryptedPassword = try password.decrypt()!
|
SVProgressHUD.setDefaultStyle(.dark)
|
||||||
UIPasteboard.general.string = decryptedPassword.password
|
SVProgressHUD.show(withStatus: "Decrypting")
|
||||||
generator.impactOccurred()
|
DispatchQueue.global(qos: .userInteractive).async {
|
||||||
SVProgressHUD.setDefaultMaskType(.clear)
|
var decryptedPassword: Password?
|
||||||
SVProgressHUD.setDefaultStyle(.dark)
|
do {
|
||||||
SVProgressHUD.showInfo(withStatus: "Password Copied")
|
decryptedPassword = try password.decrypt()!
|
||||||
SVProgressHUD.dismiss(withDelay: 0.6)
|
} catch {
|
||||||
} catch {
|
print(error)
|
||||||
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)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue