Polish code

This commit is contained in:
Bob Sun 2017-03-02 22:10:41 +08:00
parent f271d4870a
commit cbbd7e08b6
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4

View file

@ -206,7 +206,7 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
return cell
}
private func getPasswordEntry(by indexPath: IndexPath) -> PasswordsTableEntry{
private func getPasswordEntry(by indexPath: IndexPath) -> PasswordsTableEntry {
var entry: PasswordsTableEntry
let index = sections[indexPath.section].index + indexPath.row
if searchController.isActive && searchController.searchBar.text != "" {
@ -260,7 +260,7 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
}
func copyToPasteboard(from indexPath: IndexPath) {
if Defaults[.pgpKeyID] == nil {
guard Defaults[.pgpKeyID] != nil else {
Utils.alert(title: "Cannot Copy Password", message: "PGP Key is not set. Please set your PGP Key first.", controller: self, completion: nil)
return
}