diff --git a/enzevalos_iphone/ContactViewController.swift b/enzevalos_iphone/ContactViewController.swift index f5c1ef0ead3bac3eda5ccbc6343f8e219bab2245..707c72dc401da6d58db939492a34f85fe99fed30 100644 --- a/enzevalos_iphone/ContactViewController.swift +++ b/enzevalos_iphone/ContactViewController.swift @@ -343,7 +343,7 @@ extension ContactViewController: UITableViewDataSource { return cell case 4 where !keyRecord.hasKey: let cell = tableView.dequeueReusableCell(withIdentifier: "KeyCell", for: indexPath) - cell.textLabel?.text = "abc" + cell.textLabel?.text = "abc" // @jakob: ?? return cell case 4 where keyRecord.hasKey: let cell = tableView.dequeueReusableCell(withIdentifier: "RecordCell", for: indexPath) as! RecordCell diff --git a/enzevalos_iphone/DataHandler.swift b/enzevalos_iphone/DataHandler.swift index 01b82cf2c305f13146e8dfc76445269c00e94292..5da140257aee9396ce8ce46956bbd9bb5029e9aa 100644 --- a/enzevalos_iphone/DataHandler.swift +++ b/enzevalos_iphone/DataHandler.swift @@ -362,8 +362,8 @@ class DataHandler { sk.obsolete = false sk.importedDate = Date () as NSDate UserManager.storeUserValue(keyID as AnyObject, attribute: Attribute.prefSecretKeyID) - let name = UserManager.loadUserValue(Attribute.accountname) as! String let adr = UserManager.loadUserValue(Attribute.userAddr) as! String + let name = UserManager.loadUserValue(Attribute.accountname) as? String ?? adr _ = getContact(name: name, address: adr, key: keyID, prefer_enc: true) } save(during: "new sk") @@ -768,7 +768,7 @@ class DataHandler { case EncryptionState.UnableToDecrypt: mail.unableToDecrypt = true mail.isEncrypted = true - mail.trouble = true + mail.trouble = false //TODO @jakob: we should discuss this case EncryptionState.ValidEncryptedWithOldKey, EncryptionState.ValidedEncryptedWithCurrentKey: mail.isEncrypted = true mail.trouble = false diff --git a/enzevalos_iphone/SwiftPGP.swift b/enzevalos_iphone/SwiftPGP.swift index b39376db930e0c133b7312546ef60eb1dd8f5aba..f206e89af87de5266015d35d599dbd743e0b26b1 100644 --- a/enzevalos_iphone/SwiftPGP.swift +++ b/enzevalos_iphone/SwiftPGP.swift @@ -317,7 +317,7 @@ class SwiftPGP: Encryption{ } }catch{ encState = EncryptionState.UnableToDecrypt - sigState = SignatureState.InvalidSignature + sigState = SignatureState.NoSignature break } }